Method: OpenPGP::Digest.for
- Defined in:
- lib/openpgp/digest.rb
.for(identifier) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/openpgp/digest.rb', line 17 def self.for(identifier) case identifier when Symbol then const_get(identifier.to_s.upcase) when String then const_get(identifier.upcase.to_sym) when 1 then const_get(:MD5) when 2 then const_get(:SHA1) when 3 then const_get(:RIPEMD160) when 8 then const_get(:SHA256) when 9 then const_get(:SHA384) when 10 then const_get(:SHA512) when 11 then const_get(:SHA224) end end |