October 2006
Intermediate to advanced
888 pages
16h 55m
English
The MD5 message-digest algorithm produces a 128-bit fingerprint or message digest of a message of arbitrary length. This is in the form of a hash, so the encryption is one-way and does not allow for the discovery of the original message from the digest. Ruby has an extension for a class to implement MD5; for those interested in the source code, it’s in the ext/md5 directory of the standard Ruby distribution.
There are two class methods, new and md5, to create a new MD5 object. There is really no difference in them:
require 'md5' hash = MD5.md5 hash = MD5.new
There are four instance methods: clone, digest, hexdigest, and update. The clone method simply copies the object; update is used to add content ...
Read now
Unlock full access