blob: fdb4bcc04f79aabfe145c0da6ad3e7510f138340 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
.\" 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)
<< str
MD5���֥������Ȥ�ʸ������ɲä��롣ʣ����update��Ƥ֤��Ȥ�ʸ
�����Ϣ�뤷��update��Ƥ֤��Ȥ������������ʤ�� m.update(a);
m.update(b) �� m.update(a+b) �ȡ� m << a << b �� m << a+b ��
���줾�������Ǥ��롣
-------------------------------------------------------
Local variables:
fill-column: 70
end:
|