source:
extensions/gsdl-video/trunk/installed/cmdline/lib/ruby/1.8/sha1.rb@
18425
Last change on this file since 18425 was 18425, checked in by , 15 years ago | |
---|---|
File size: 418 bytes |
Line | |
---|---|
1 | # just for compatibility; requiring "sha1" is obsoleted |
2 | # |
3 | # $RoughId: sha1.rb,v 1.4 2001/07/13 15:38:27 knu Exp $ |
4 | # $Id: sha1.rb 12008 2007-03-06 10:12:12Z knu $ |
5 | |
6 | require 'digest/sha1' |
7 | |
8 | class SHA1 < Digest::SHA1 |
9 | class << self |
10 | alias orig_new new |
11 | def new(str = nil) |
12 | if str |
13 | orig_new.update(str) |
14 | else |
15 | orig_new |
16 | end |
17 | end |
18 | |
19 | def sha1(*args) |
20 | new(*args) |
21 | end |
22 | end |
23 | end |
Note:
See TracBrowser
for help on using the repository browser.