struggle 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/struggle/cipher.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: decea1892b336892b230b95e55c84c88d09562b4
|
4
|
+
data.tar.gz: 6fa1c5da45acfc1eac42a6a4cc1b67f0a94a6c12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 594dbe2b5f15d89be5f84812936920262b6124c3ed052daa6dc6278d2963aa6b3e56724441cf137727727721e3ccbf71e4dad25d053303690b713d84fd03b91c
|
7
|
+
data.tar.gz: b65f44f5ab143bb688d34074ef80891054bac4588877ed906406d488f9e2bbea14d0190839ff6f87902d5d49becb27dfd0e9e8c71b9e20836be1e6c21ecb648f
|
data/lib/struggle/cipher.rb
CHANGED
@@ -6,7 +6,7 @@ module Struggle
|
|
6
6
|
cipher.encrypt
|
7
7
|
cipher.key = key
|
8
8
|
cipher.iv = iv
|
9
|
-
cipher.update(data) + cipher.final
|
9
|
+
Base64.encode64(cipher.update(data) + cipher.final)
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.decipher(data, key ,iv)
|
@@ -14,7 +14,7 @@ module Struggle
|
|
14
14
|
decipher.decrypt
|
15
15
|
decipher.key = key
|
16
16
|
decipher.iv = iv
|
17
|
-
decipher.update(data) + decipher.final
|
17
|
+
Base64.decode64(decipher.update(data) + decipher.final)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: struggle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iconv
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: vcode,tfile,pager,func,logistic,pay_gateway,tmagick,class_extend,
|
41
|
+
description: vcode,tfile,pager,func,logistic,pay_gateway,tmagick,class_extend,cipher;
|
42
42
|
email: 54850915@qq.com
|
43
43
|
executables: []
|
44
44
|
extensions: []
|