update

digest.update(string) â aString
Instance Public methods

Not every message digest can be computed in one single pass. If a message digest is to be computed from several subsequent sources, then each may be passed individually to the Digest instance.

Example

digest = OpenSSL::Digest::SHA256.new
digest.update('First input')
digest << 'Second input' # equivalent to digest.update('Second input')
result = digest.digest

<<

doc_ruby_on_rails
2015-04-25 01:41:14
Comments
Leave a Comment

Please login to continue.