Class: Puppet::SSL::Digest
Instance Attribute Summary collapse
-
#digest ⇒ Object
readonly
Returns the value of attribute digest.
Instance Method Summary collapse
-
#initialize(algorithm, content) ⇒ Digest
constructor
A new instance of Digest.
- #name ⇒ Object
- #to_hex ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#digest ⇒ Object (readonly)
Returns the value of attribute digest.
4 5 6 |
# File 'lib/puppet/ssl/digest.rb', line 4 def digest @digest end |
Instance Method Details
#name ⇒ Object
19 20 21 |
# File 'lib/puppet/ssl/digest.rb', line 19 def name @digest.name.upcase end |
#to_hex ⇒ Object
15 16 17 |
# File 'lib/puppet/ssl/digest.rb', line 15 def to_hex @digest.hexdigest.scan(/../).join(':').upcase end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/puppet/ssl/digest.rb', line 11 def to_s "(#{name}) #{to_hex}" end |