# class Puppet::SSL::Digest

### Attributes

digest[R]

### Public Class Methods

new(algorithm, content) click to toggle source

    # File lib/puppet/ssl/digest.rb, line 4
    def initialize(algorithm, content)
      algorithm ||= 'SHA256'
      @digest = OpenSSL::Digest.new(algorithm, content)
    end

### Public Instance Methods

name() click to toggle source

    # File lib/puppet/ssl/digest.rb, line 17
    def name
      @digest.name.upcase
    end

to_hex() click to toggle source

    # File lib/puppet/ssl/digest.rb, line 13
    def to_hex
      @digest.hexdigest.scan(/../).join(':').upcase
    end

to_s() click to toggle source

    # File lib/puppet/ssl/digest.rb, line 9
    def to_s
      "(#{name}) #{to_hex}"
    end