1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/md5/md5.txt
knu a57dc21ef0 * ext/sha1/sha1.txt.jp: add the Japanese version derived from
ext/md5/md5.txt.jp.

* ext/sha1/sha1.txt: revise the copyright info and reduce the
difference from ext/md5/md5.txt.

* ext/md5/md5.txt: reduce the difference from ext/sha1/sha1.txt.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-16 22:19:30 +00:00

51 lines
1.1 KiB
Text

.\" md5.doc - -*- Indented-Text -*- created at: Fri Aug 2 12:01:27 JST 1996
** MD5(Class)
A class to implement MD5 Message-Digest Algorithm by RSA Data
Security, Inc., described in RFC1321.
Superclass: Object
Class Methods:
new([str])
md5([str])
Creates a new MD5 object. If a string argument is given, it
is added to the object. (see update.)
Methods:
clone
Copies the MD5 object.
digest
Returns the MD5 hash of the added strings as a string of 16
bytes.
hexdigest
Returns the MD5 hash of the added strings as a string of 32
hexadecimal digits. This method is equal to:
def hexdigest
ret = ''
digest.each_byte {|i| ret << sprintf('%02x', i) }
ret
end
update(str)
<< str
Update the MD5 object with the string str. Repeated calls are
equivalent to a single call with the concatenation of all the
arguments, i.e. m.update(a); m.update(b) is equivalent to
m.update(a+b) and m << a << b is equivalent to m << a+b.
-------------------------------------------------------
Local variables:
fill-column: 70
end: