ruby--ruby/ext/md5/md5.txt.jp

50 lines
1.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.\" md5.doc - -*- Indented-Text -*- created at: Fri Aug 2 12:01:27 JST 1996
** MD5(クラス)
RFC1321に記述されているRSA Data Security, Inc. の MD5 Message-Digest
Algorithmを実装するクラス
SuperClass: Object
Class Methods:
new([str])
md5([str])
新しいMD5オブジェクトを生成する文字列引数が与えられるとそれ
を追加する(see update)
Methods:
clone
MD5オブジェクトの複製を作る
digest
今までに追加した文字列に対するハッシュ値を16バイト長の文字列で
返す.
hexdigest
今までに追加した文字列に対するハッシュ値を、ASCIIコードを使って
16進数の列を示す'fe5c2235f48d2bcc911afabea23cd5aa'のような32文字
の文字列にエンコードして返す。Rubyで書くと以下と同じ。
def hexdigest
ret = ''
digest.each_byte {|i| ret << sprintf('%02x', i) }
ret
end
update(str)
MD5オブジェクトに文字列を追加する。複数回updateを呼ぶことは文
字列を連結してupdateを呼ぶことと等しい
-------------------------------------------------------
Local variables:
fill-column: 70
end: