new

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')
doc_ruby_on_rails
2015-04-25 01:15:37
Comments
Leave a Comment

Please login to continue.