mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 09:16:02 +01:00
Unpacked OpenID gem. #699
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2437 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
25
vendor/gems/ruby-openid-2.1.4/lib/hmac/sha2.rb
vendored
Normal file
25
vendor/gems/ruby-openid-2.1.4/lib/hmac/sha2.rb
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
require 'hmac/hmac'
|
||||
require 'digest/sha2'
|
||||
|
||||
module HMAC
|
||||
class SHA256 < Base
|
||||
def initialize(key = nil)
|
||||
super(Digest::SHA256, 64, 32, key)
|
||||
end
|
||||
public_class_method :new, :digest, :hexdigest
|
||||
end
|
||||
|
||||
class SHA384 < Base
|
||||
def initialize(key = nil)
|
||||
super(Digest::SHA384, 128, 48, key)
|
||||
end
|
||||
public_class_method :new, :digest, :hexdigest
|
||||
end
|
||||
|
||||
class SHA512 < Base
|
||||
def initialize(key = nil)
|
||||
super(Digest::SHA512, 128, 64, key)
|
||||
end
|
||||
public_class_method :new, :digest, :hexdigest
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user