gibberish 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +0 -3
- data/.travis.yml +5 -0
- data/CHANGELOG.mdown +3 -0
- data/Gemfile +1 -0
- data/README.markdown +1 -0
- data/Rakefile +1 -0
- data/gibberish.gemspec +0 -4
- data/lib/gibberish/aes.rb +4 -2
- data/lib/gibberish/version.rb +1 -1
- data/spec/hmac_spec.rb +5 -5
- metadata +4 -43
- data.tar.gz.sig +0 -0
- data/gem-public_cert.pem +0 -19
- metadata.gz.sig +0 -2
data/.gitmodules
CHANGED
data/.travis.yml
ADDED
data/CHANGELOG.mdown
CHANGED
data/Gemfile
CHANGED
data/README.markdown
CHANGED
data/Rakefile
CHANGED
data/gibberish.gemspec
CHANGED
@@ -14,10 +14,6 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = "gibberish"
|
16
16
|
|
17
|
-
# Gem Signing
|
18
|
-
s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem")
|
19
|
-
s.cert_chain = ["gem-public_cert.pem"]
|
20
|
-
|
21
17
|
s.files = `git ls-files`.split("\n")
|
22
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
data/lib/gibberish/aes.rb
CHANGED
@@ -31,10 +31,12 @@ module Gibberish
|
|
31
31
|
#
|
32
32
|
# @param [String] password
|
33
33
|
# @param [Integer] size
|
34
|
-
|
34
|
+
# @param [String] mode
|
35
|
+
def initialize(password, size=256, mode="cbc")
|
35
36
|
@password = password
|
36
37
|
@size = size
|
37
|
-
@
|
38
|
+
@mode = mode
|
39
|
+
@cipher = OpenSSL::Cipher::Cipher.new("aes-#{size}-#{mode}")
|
38
40
|
end
|
39
41
|
|
40
42
|
def encrypt(data, opts={})
|
data/lib/gibberish/version.rb
CHANGED
data/spec/hmac_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe "HMAC" do
|
|
8
8
|
|
9
9
|
it "should work with OpenSSL HMAC" do
|
10
10
|
hmac = Gibberish::HMAC("password", "data\n")
|
11
|
-
o_hmac = `echo "data" | openssl dgst -sha1 -hmac 'password'`
|
11
|
+
o_hmac = `echo "data" | openssl dgst -sha1 -hmac 'password' | sed 's/^.*= //'`
|
12
12
|
hmac.must_equal(o_hmac.chomp)
|
13
13
|
end
|
14
14
|
|
@@ -19,7 +19,7 @@ describe "HMAC" do
|
|
19
19
|
|
20
20
|
it "should work with OpenSSL HMAC for sha224" do
|
21
21
|
hmac = Gibberish::HMAC("password", "data\n", :digest => :sha224)
|
22
|
-
o_hmac = `echo "data" | openssl dgst -sha224 -hmac 'password'`
|
22
|
+
o_hmac = `echo "data" | openssl dgst -sha224 -hmac 'password' | sed 's/^.*= //'`
|
23
23
|
hmac.must_equal(o_hmac.chomp)
|
24
24
|
end
|
25
25
|
|
@@ -30,7 +30,7 @@ describe "HMAC" do
|
|
30
30
|
|
31
31
|
it "should work with OpenSSL HMAC for sha256" do
|
32
32
|
hmac = Gibberish::HMAC("password", "data\n", :digest => :sha256)
|
33
|
-
o_hmac = `echo "data" | openssl dgst -sha256 -hmac 'password'`
|
33
|
+
o_hmac = `echo "data" | openssl dgst -sha256 -hmac 'password' | sed 's/^.*= //'`
|
34
34
|
hmac.must_equal(o_hmac.chomp)
|
35
35
|
end
|
36
36
|
|
@@ -41,7 +41,7 @@ describe "HMAC" do
|
|
41
41
|
|
42
42
|
it "should work with OpenSSL HMAC for sha384" do
|
43
43
|
hmac = Gibberish::HMAC("password", "data\n", :digest => :sha384)
|
44
|
-
o_hmac = `echo "data" | openssl dgst -sha384 -hmac 'password'`
|
44
|
+
o_hmac = `echo "data" | openssl dgst -sha384 -hmac 'password' | sed 's/^.*= //'`
|
45
45
|
hmac.must_equal(o_hmac.chomp)
|
46
46
|
end
|
47
47
|
|
@@ -51,7 +51,7 @@ describe "HMAC" do
|
|
51
51
|
|
52
52
|
it "should work with OpenSSL HMAC for sha512" do
|
53
53
|
hmac = Gibberish::HMAC("password", "data\n", :digest => :sha512)
|
54
|
-
o_hmac = `echo "data" | openssl dgst -sha512 -hmac 'password'`
|
54
|
+
o_hmac = `echo "data" | openssl dgst -sha512 -hmac 'password' | sed 's/^.*= //'`
|
55
55
|
hmac.must_equal(o_hmac.chomp)
|
56
56
|
end
|
57
57
|
|
metadata
CHANGED
@@ -1,54 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gibberish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Mark Percival
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
|
-
cert_chain:
|
12
|
-
-
|
13
|
-
|
14
|
-
MIIDHjCCAgagAwIBAgIBADANBgkqhkiG9w0BAQUFADA1MQowCAYDVQQDDAFtMRMw
|
15
|
-
|
16
|
-
EQYKCZImiZPyLGQBGRYDbWRwMRIwEAYKCZImiZPyLGQBGRYCaW0wHhcNMTMwMjEx
|
17
|
-
|
18
|
-
MTYwNjAxWhcNMTQwMjExMTYwNjAxWjA1MQowCAYDVQQDDAFtMRMwEQYKCZImiZPy
|
19
|
-
|
20
|
-
LGQBGRYDbWRwMRIwEAYKCZImiZPyLGQBGRYCaW0wggEiMA0GCSqGSIb3DQEBAQUA
|
21
|
-
|
22
|
-
A4IBDwAwggEKAoIBAQCsyb70vRSb3hfN5Go04jz84/XRf68uJD9NeNyE0y+lylOY
|
23
|
-
|
24
|
-
jWEMaLu9TE2kYKOAvyZ/9+ioK19P+se1jCTIM+PZ11bz4Wmgk23XqmuSjA6v1dEA
|
25
|
-
|
26
|
-
rlmsudYmlW36VviSIdTN3rvwoSiB+XXiUujF97nhvjxBpxnc1hJkxRz4KYwjjUPd
|
27
|
-
|
28
|
-
NiGxK2GULOVwEEk5BScIG+FFJd/NKHF8tkxiiZNyjZDIwTvqMhYpnr/VRX+EsCkr
|
29
|
-
|
30
|
-
A9j1a1GRyAHSUtxWuqjpWaXff2CEg5JavLZk1P74Zxx0c+rpsvY+bD0w9bMyNdgu
|
31
|
-
|
32
|
-
jxxRo0Ompt3sCfpPwdp1hTBHJycrsdfH9rscQ7SPAgMBAAGjOTA3MAkGA1UdEwQC
|
33
|
-
|
34
|
-
MAAwHQYDVR0OBBYEFLqZ2ITNwA6y/W8sBBWIUECnr5KjMAsGA1UdDwQEAwIEsDAN
|
35
|
-
|
36
|
-
BgkqhkiG9w0BAQUFAAOCAQEAWRYRvVRJadDNC5zUEakTzrxb45Ket7dkTn8ejvHK
|
37
|
-
|
38
|
-
nYtr9rjtreDjUrXSrQ9rThIMvcmMixyflSF93n5cqWYPFkU0V0p7s8K6b0vmRk6d
|
39
|
-
|
40
|
-
iALE8XKqQKqzQSxk4r9FZeM/hk1FC2WBwjuNEy5tcpLF4KERVJzYq54mIyWDUV5c
|
41
|
-
|
42
|
-
VJKW8u5/Wu2D4LNNIkwkhh2ULYOA6UBVwMrjp0ZHpV7jrt8SIyl1c7ONhnY0Pxey
|
43
|
-
|
44
|
-
mxtia3OcUaHjfnuLeQqK7YpQCM2f/8sur+kpDjXH0DYTjmlOvZ07JI0Isd7zobrL
|
45
|
-
|
46
|
-
2NEhdVRiMlG7L/ncFwqpHzWFY0r37QIQ9UwO5+t6lC9Cfg==
|
47
|
-
|
48
|
-
-----END CERTIFICATE-----
|
49
|
-
|
50
|
-
'
|
51
|
-
date: 2013-02-11 00:00:00.000000000 Z
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
52
13
|
dependencies: []
|
53
14
|
description: Supports OpenSSL compatible AES, HMAC, and RSA encryption
|
54
15
|
email:
|
@@ -59,6 +20,7 @@ extra_rdoc_files: []
|
|
59
20
|
files:
|
60
21
|
- .gitignore
|
61
22
|
- .gitmodules
|
23
|
+
- .travis.yml
|
62
24
|
- .yardoc/checksums
|
63
25
|
- .yardoc/objects/root.dat
|
64
26
|
- .yardoc/proxy_types
|
@@ -68,7 +30,6 @@ files:
|
|
68
30
|
- LICENSE
|
69
31
|
- README.markdown
|
70
32
|
- Rakefile
|
71
|
-
- gem-public_cert.pem
|
72
33
|
- gibberish.gemspec
|
73
34
|
- lib/gibberish.rb
|
74
35
|
- lib/gibberish/aes.rb
|
data.tar.gz.sig
DELETED
Binary file
|
data/gem-public_cert.pem
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDHjCCAgagAwIBAgIBADANBgkqhkiG9w0BAQUFADA1MQowCAYDVQQDDAFtMRMw
|
3
|
-
EQYKCZImiZPyLGQBGRYDbWRwMRIwEAYKCZImiZPyLGQBGRYCaW0wHhcNMTMwMjEx
|
4
|
-
MTYwNjAxWhcNMTQwMjExMTYwNjAxWjA1MQowCAYDVQQDDAFtMRMwEQYKCZImiZPy
|
5
|
-
LGQBGRYDbWRwMRIwEAYKCZImiZPyLGQBGRYCaW0wggEiMA0GCSqGSIb3DQEBAQUA
|
6
|
-
A4IBDwAwggEKAoIBAQCsyb70vRSb3hfN5Go04jz84/XRf68uJD9NeNyE0y+lylOY
|
7
|
-
jWEMaLu9TE2kYKOAvyZ/9+ioK19P+se1jCTIM+PZ11bz4Wmgk23XqmuSjA6v1dEA
|
8
|
-
rlmsudYmlW36VviSIdTN3rvwoSiB+XXiUujF97nhvjxBpxnc1hJkxRz4KYwjjUPd
|
9
|
-
NiGxK2GULOVwEEk5BScIG+FFJd/NKHF8tkxiiZNyjZDIwTvqMhYpnr/VRX+EsCkr
|
10
|
-
A9j1a1GRyAHSUtxWuqjpWaXff2CEg5JavLZk1P74Zxx0c+rpsvY+bD0w9bMyNdgu
|
11
|
-
jxxRo0Ompt3sCfpPwdp1hTBHJycrsdfH9rscQ7SPAgMBAAGjOTA3MAkGA1UdEwQC
|
12
|
-
MAAwHQYDVR0OBBYEFLqZ2ITNwA6y/W8sBBWIUECnr5KjMAsGA1UdDwQEAwIEsDAN
|
13
|
-
BgkqhkiG9w0BAQUFAAOCAQEAWRYRvVRJadDNC5zUEakTzrxb45Ket7dkTn8ejvHK
|
14
|
-
nYtr9rjtreDjUrXSrQ9rThIMvcmMixyflSF93n5cqWYPFkU0V0p7s8K6b0vmRk6d
|
15
|
-
iALE8XKqQKqzQSxk4r9FZeM/hk1FC2WBwjuNEy5tcpLF4KERVJzYq54mIyWDUV5c
|
16
|
-
VJKW8u5/Wu2D4LNNIkwkhh2ULYOA6UBVwMrjp0ZHpV7jrt8SIyl1c7ONhnY0Pxey
|
17
|
-
mxtia3OcUaHjfnuLeQqK7YpQCM2f/8sur+kpDjXH0DYTjmlOvZ07JI0Isd7zobrL
|
18
|
-
2NEhdVRiMlG7L/ncFwqpHzWFY0r37QIQ9UwO5+t6lC9Cfg==
|
19
|
-
-----END CERTIFICATE-----
|
metadata.gz.sig
DELETED