wikk_aes_256 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/wikk_aes_256.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 182e4428aaf24f3a65bf34503a6a4c51934eb349
|
4
|
+
data.tar.gz: f1898701948216bb190c0b5cec7682bb98122029
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 524a29f5a84a51b83874c0621d776defaf0e07d4c77c8ad96dcfab0a00832ae76c203788ef2f94e657e44a4025c130cc2e42b10426a33ab68cbdc2b4a029a63f
|
7
|
+
data.tar.gz: f4c141be831b11fd6bec33ff8aafb7b3f23f05cac2ebbb175a6da8803084a595d7b5b72fd4c9e68a700f10656ff5dbd3fead4cd012fe1348fc1d8cd9a42f689c
|
data/lib/wikk_aes_256.rb
CHANGED
@@ -7,7 +7,7 @@ module WIKK
|
|
7
7
|
# @attr_reader [String] plain_text the decrypted text
|
8
8
|
# @attr_reader [String] cipher_text the encrypted text
|
9
9
|
class AES_256
|
10
|
-
VERSION = "0.1.
|
10
|
+
VERSION = "0.1.1"
|
11
11
|
AES_256_CBC = "AES-256-CBC"
|
12
12
|
|
13
13
|
attr_reader :plain_text, :cipher_text
|
@@ -37,7 +37,7 @@ module WIKK
|
|
37
37
|
|
38
38
|
# @return [String] base64 version of @key
|
39
39
|
def key_to_s
|
40
|
-
return [@key].pack('m')
|
40
|
+
return [@key].pack('m').chomp
|
41
41
|
end
|
42
42
|
|
43
43
|
# @param [String] turns base64 version of key into AES_256_CBC Symetric Key.
|
@@ -53,7 +53,7 @@ module WIKK
|
|
53
53
|
|
54
54
|
# @return [String] return Base64 version of initialization vector @iv
|
55
55
|
def iv_to_s
|
56
|
-
return([@iv].pack('m'))
|
56
|
+
return([@iv].pack('m')).chomp
|
57
57
|
end
|
58
58
|
|
59
59
|
# @param [String] turns base64 version of iv into AES_256_CBC initialization vector.
|
@@ -87,7 +87,7 @@ module WIKK
|
|
87
87
|
# @return [String] Base64 string representing encrypted source
|
88
88
|
def cipher_to_s(unencrypted_source = nil)
|
89
89
|
encrypt(unencrypted_source) if(unencrypted_source != nil)
|
90
|
-
return [@cipher_text].pack('m')
|
90
|
+
return [@cipher_text].pack('m').chomp
|
91
91
|
end
|
92
92
|
|
93
93
|
#Decrypts source using AES 256 CBC, using @key and @iv
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wikk_aes_256
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Burrowes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hoe-yard
|