1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/digest/lib/sha1.rb
knu 929c7fb389 * ext/digest/lib/md5.rb (MD5::new, MD5::md5): Do not modify
Digest::MD5.

* ext/digest/lib/sha1.rb (SHA1::new, SHA1::sha1): Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-06 10:09:51 +00:00

23 lines
377 B
Ruby

# just for compatibility; requiring "sha1" is obsoleted
#
# $RoughId: sha1.rb,v 1.4 2001/07/13 15:38:27 knu Exp $
# $Id$
require 'digest/sha1'
class SHA1 < Digest::SHA1
class << self
alias orig_new new
def new(str = nil)
if str
orig_new.update(str)
else
orig_new
end
end
def sha1(*args)
new(*args)
end
end
end