struggle 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/struggle/cipher.rb +2 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12d0930a5737bcca81309c72af840ca4ec4a6d37
4
- data.tar.gz: 84919a03b2dd7b672a8b206e836d16b3740e700e
3
+ metadata.gz: decea1892b336892b230b95e55c84c88d09562b4
4
+ data.tar.gz: 6fa1c5da45acfc1eac42a6a4cc1b67f0a94a6c12
5
5
  SHA512:
6
- metadata.gz: 52b12d2b517cc75f873a5fff5ac85512fd31c21fa15ab10203b76323657f1e5d9f7a5b6e13621981d73274bfb484082b5957f243d99e1710eaa5229558742b8a
7
- data.tar.gz: fd491d62fbb6f3178eecea7d7d33ba9a7f7e6247b2f1d7b10ed673c6f1537e834247b46d394dab1da2207b40c82e483c9e41ccb0dd0a2efa7c971891482a766c
6
+ metadata.gz: 594dbe2b5f15d89be5f84812936920262b6124c3ed052daa6dc6278d2963aa6b3e56724441cf137727727721e3ccbf71e4dad25d053303690b713d84fd03b91c
7
+ data.tar.gz: b65f44f5ab143bb688d34074ef80891054bac4588877ed906406d488f9e2bbea14d0190839ff6f87902d5d49becb27dfd0e9e8c71b9e20836be1e6c21ecb648f
@@ -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.1
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-03 00:00:00.000000000 Z
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,aes;
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: []