blob: ca6013ca47e5dbef49276b0f61e1e9c7f8470bc3 (
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
53
54
55
56
57
|
.\" sha1.doc - -*- Indented-Text -*- created at: Thu Mat 17 06:51:50 JST 2001
** SHA1(���饹)
FIPS PUB 180-1�˵��Ҥ���Ƥ���NIST (the US' National Institute of
Standards and Technology) �� SHA1 Secure Hash Algorithm Algorithm�����
���륯�饹��
SuperClass: Object
Class Methods:
new([str])
sha1([str])
������SHA1���֥������Ȥ��������롥ʸ���������Ϳ������Ȥ���
���ɲä���(see update)��
Methods:
clone
SHA1���֥������Ȥ�ʣ�����롣
digest
���ޤǤ��ɲä���ʸ������Ф���ϥå����ͤ�20�Х���Ĺ��ʸ�����
�֤���
hexdigest
���ޤǤ��ɲä���ʸ������Ф���ϥå����ͤ�ASCII�����ɤ�Ȥä�
16�ʿ������'18e40e1401eef67e1ae69efab09afb71f87ffb81'�Τ褦
��40ʸ����ʸ����˥����ɤ����֤���Ruby�ǽȰʲ���Ʊ����
def hexdigest
ret = ''
digest.each_byte {|i| ret << sprintf('%02x', i) }
ret
end
update(str)
<< str
SHA1���֥������Ȥ�ʸ������ɲä��롣ʣ����update��Ƥ֤��Ȥ�ʸ
�����Ϣ�뤷��update��Ƥ֤��Ȥ������������ʤ�� m.update(a);
m.update(b) �� m.update(a+b) �ȡ� m << a << b �� m << a+b ��
���줾�������Ǥ��롣
Copyright:
sha1.c �ϥѥ֥�å��ɥᥤ��Ǥ��롣
-------------------------------------------------------
Local variables:
fill-column: 70
end:
|