Sha256: b92ee71dbd1c24d164f8647262e5be3e596455cfac6f6090d4ee72bb3e9b35d8

Contents?: true

Size: 333 Bytes

Versions: 784

Compression:

Stored size: 333 Bytes

Contents

class Puppet::SSL::Digest
  attr_reader :digest

  def initialize(algorithm, content)
    algorithm ||= 'SHA256'
    @digest = OpenSSL::Digest.new(algorithm, content)
  end

  def to_s
    "(#{name}) #{to_hex}"
  end

  def to_hex
    @digest.hexdigest.scan(/../).join(':').upcase
  end

  def name
    @digest.name.upcase
  end
end

Version data entries

784 entries across 784 versions & 4 rubygems

Version Path
puppet-7.34.0 lib/puppet/ssl/digest.rb
puppet-7.34.0-x86-mingw32 lib/puppet/ssl/digest.rb
puppet-7.34.0-x64-mingw32 lib/puppet/ssl/digest.rb
puppet-7.34.0-universal-darwin lib/puppet/ssl/digest.rb
puppet-7.33.0 lib/puppet/ssl/digest.rb
puppet-7.33.0-x86-mingw32 lib/puppet/ssl/digest.rb
puppet-7.33.0-x64-mingw32 lib/puppet/ssl/digest.rb
puppet-7.33.0-universal-darwin lib/puppet/ssl/digest.rb
puppet-7.32.1 lib/puppet/ssl/digest.rb
puppet-7.32.1-x86-mingw32 lib/puppet/ssl/digest.rb
puppet-7.32.1-x64-mingw32 lib/puppet/ssl/digest.rb
puppet-7.32.1-universal-darwin lib/puppet/ssl/digest.rb
puppet-7.31.0 lib/puppet/ssl/digest.rb
puppet-7.31.0-x86-mingw32 lib/puppet/ssl/digest.rb
puppet-7.31.0-x64-mingw32 lib/puppet/ssl/digest.rb
puppet-7.31.0-universal-darwin lib/puppet/ssl/digest.rb
puppet-7.30.0 lib/puppet/ssl/digest.rb
puppet-7.30.0-x86-mingw32 lib/puppet/ssl/digest.rb
puppet-7.30.0-x64-mingw32 lib/puppet/ssl/digest.rb
puppet-7.30.0-universal-darwin lib/puppet/ssl/digest.rb