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.
1 | digest = OpenSSL::Digest. new ( 'sha256' , 'digestdata' ) |
is equal to
1 2 | digest = OpenSSL::Digest. new ( 'sha256' ) digest.update( 'digestdata' ) |
Example
1 | digest = OpenSSL::Digest. new ( 'sha1' ) |
Please login to continue.