summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-16 22:19:30 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-16 22:19:30 +0000
commita57dc21ef03a2dee9283cee68a667a28e8246ac8 (patch)
tree1b976d674c5f8a7b94fdeab183e0d356b070fd2e /ext
parentca841613cd3a161c4d5744952d50b415b705cea5 (diff)
* 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
Diffstat (limited to 'ext')
-rw-r--r--ext/md5/md5.txt2
-rw-r--r--ext/sha1/sha1.txt38
-rw-r--r--ext/sha1/sha1.txt.jp57
3 files changed, 80 insertions, 17 deletions
diff --git a/ext/md5/md5.txt b/ext/md5/md5.txt
index 211a5302b5..a3c50ff407 100644
--- a/ext/md5/md5.txt
+++ b/ext/md5/md5.txt
@@ -5,7 +5,7 @@
A class to implement MD5 Message-Digest Algorithm by RSA Data
Security, Inc., described in RFC1321.
-SuperClass: Object
+Superclass: Object
Class Methods:
diff --git a/ext/sha1/sha1.txt b/ext/sha1/sha1.txt
index 24bf0d4244..dd13993d53 100644
--- a/ext/sha1/sha1.txt
+++ b/ext/sha1/sha1.txt
@@ -1,33 +1,36 @@
-Class SHA1
+.\" sha1.doc - -*- Indented-Text -*- created at: Thu Mat 17 06:51:50 JST 2001
- A class to implement the SHA1 Secure Hash Algorithm by NIST (the US'
- National Institute of Standards and Technology), described in FIPS PUB
- 180-1.
+** SHA1(Class)
+
+A class to implement the SHA1 Secure Hash Algorithm by NIST (the US'
+National Institute of Standards and Technology), described in FIPS PUB
+180-1.
Superclass: Object
Class Methods:
- new([str])
- sha1([str])
+ new([str])
+ sha1([str])
Creates a new SHA1 object. If a string argument is given, it
is added to the object. (see update.)
Methods:
- clone
+ clone
Copies the SHA1 object.
- digest
+ digest
- Returns the SHA1 hash of the added strings as a string of 20 bytes.
+ Returns the SHA1 hash of the added strings as a string of 20
+ bytes.
- hexdigest
+ hexdigest
Returns the SHA1 hash of the added strings as a string of 40
- hexadecimal digits. This method is equal to:
+ hexadecimal digits. This method is equal to:
def hexdigest
ret = ''
@@ -35,8 +38,8 @@ Methods:
ret
end
- update(str)
- << str
+ update(str)
+ << str
Updates the SHA1 object with string str. Repeated calls are
equivalent to a single call with the concatenation of all the
@@ -45,6 +48,9 @@ Methods:
Copyright:
- README and sha1-ruby.c are derived from the Ruby source and so fall
- under the same license as Ruby. The rest of this package is in the
- public domain.
+ sha1.c is in the public domain.
+
+-------------------------------------------------------
+Local variables:
+fill-column: 70
+end:
diff --git a/ext/sha1/sha1.txt.jp b/ext/sha1/sha1.txt.jp
new file mode 100644
index 0000000000..ca6013ca47
--- /dev/null
+++ b/ext/sha1/sha1.txt.jp
@@ -0,0 +1,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: