Digest.new(string [, data]) รข Digest
Class Public methods
Creates a Digest instance based on
string
, which is either the ln (long name) or sn (short name)
of a supported digest algorithm. If data
(a
String
) is given, it is used as the initial input to the Digest instance, i.e.
digest = OpenSSL::Digest.new('sha256', 'digestdata')
is equal to
digest = OpenSSL::Digest.new('sha256') digest.update('digestdata')
Example
digest = OpenSSL::Digest.new('sha1')
Please login to continue.