Module: Gibberish

Defined in:
lib/gibberish/aes.rb,
lib/gibberish/rsa.rb,
lib/gibberish/hmac.rb,
lib/gibberish/digest.rb,
lib/gibberish/version.rb

Defined Under Namespace

Classes: AES, Digest, HMAC, RSA

Constant Summary collapse

VERSION =
"2.1.1"

Class Method Summary collapse

Class Method Details

.HMAC1(key, data) ⇒ Object


56
57
58
# File 'lib/gibberish/hmac.rb', line 56

def self.HMAC1(key, data)
  Gibberish::HMAC.digest(key, data, :sha1)
end

.HMAC224(key, data) ⇒ Object


60
61
62
# File 'lib/gibberish/hmac.rb', line 60

def self.HMAC224(key, data)
  Gibberish::HMAC.digest(key, data, :sha224)
end

.HMAC256(key, data) ⇒ Object


64
65
66
# File 'lib/gibberish/hmac.rb', line 64

def self.HMAC256(key, data)
  Gibberish::HMAC.digest(key, data, :sha256)
end

.HMAC384(key, data) ⇒ Object


68
69
70
# File 'lib/gibberish/hmac.rb', line 68

def self.HMAC384(key, data)
  Gibberish::HMAC.digest(key, data, :sha384)
end

.HMAC512(key, data) ⇒ Object


72
73
74
# File 'lib/gibberish/hmac.rb', line 72

def self.HMAC512(key, data)
  Gibberish::HMAC.digest(key, data, :sha512)
end

.MD5(data, opts = {}) ⇒ Object


150
151
152
# File 'lib/gibberish/digest.rb', line 150

def self.MD5(data, opts={})
  Digest.md5(data,opts)
end

.SHA1(data, opts = {}) ⇒ Object


130
131
132
# File 'lib/gibberish/digest.rb', line 130

def self.SHA1(data, opts={})
  Digest.sha1(data,opts)
end

.SHA224(data, opts = {}) ⇒ Object


134
135
136
# File 'lib/gibberish/digest.rb', line 134

def self.SHA224(data, opts={})
  Digest.sha224(data,opts)
end

.SHA256(data, opts = {}) ⇒ Object


138
139
140
# File 'lib/gibberish/digest.rb', line 138

def self.SHA256(data, opts={})
  Digest.sha256(data,opts)
end

.SHA384(data, opts = {}) ⇒ Object


142
143
144
# File 'lib/gibberish/digest.rb', line 142

def self.SHA384(data, opts={})
  Digest.sha384(data,opts)
end

.SHA512(data, opts = {}) ⇒ Object


146
147
148
# File 'lib/gibberish/digest.rb', line 146

def self.SHA512(data, opts={})
  Digest.sha512(data,opts)
end