class
Ruby latest stable (v2_5_5)
-
0 notes
- Superclass:
cDigest_Base
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (38)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
A class for calculating message digests using the MD5 Message-Digest Algorithm by RSA Data Security, Inc., described in RFC1321.
MD5 calculates a digest of 128 bits (16 bytes).
Examples
require 'digest' # Compute a complete digest Digest::MD5.hexdigest 'abc' #=> "90015098..." # Compute digest by chunks md5 = Digest::MD5.new # =>#<Digest::MD5> md5.update "ab" md5 << "c" # alias for #update md5.hexdigest # => "90015098..." # Use the same object to compute another digest md5.reset md5 << "message" md5.hexdigest # => "78e73102..."