aead 1.7.1 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/aead/cipher.rb +0 -18
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fa60b57e4bf63e26513af118b1ed12edc3eba1f
|
4
|
+
data.tar.gz: 567bc3e4243d6ef1f38950bc998af9fcddf28260
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 513380c93ec0da891916e9f4788168896c8e8e7fdc01e0c05a23022f7d4d7b3055790f16d6a0dd1f1b4c5c8266dc11b274c41c6c6f2d4dcf6e414de41bfaa04c
|
7
|
+
data.tar.gz: 7cf3219248dd1f0adae7b1be92e3d1cdab0af560ffd76c0e5398449e03bb24caf54bf78a6db51b808097dc326a0e988c124caf2c16c3af1d999a33fca1d160a1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.8.0
|
data/lib/aead/cipher.rb
CHANGED
@@ -109,15 +109,6 @@ class AEAD::Cipher
|
|
109
109
|
# @return [String] the generated AEAD
|
110
110
|
#
|
111
111
|
def encrypt(nonce, aad, plaintext)
|
112
|
-
nonce.force_encoding('ASCII-8BIT') if
|
113
|
-
nonce.respond_to?(:force_encoding)
|
114
|
-
|
115
|
-
aad.force_encoding('ASCII-8BIT') if
|
116
|
-
aad.respond_to?(:force_encoding)
|
117
|
-
|
118
|
-
plaintext.force_encoding('ASCII-8BIT') if
|
119
|
-
plaintext.respond_to?(:force_encoding)
|
120
|
-
|
121
112
|
_verify_nonce_bytesize(nonce, self.nonce_len)
|
122
113
|
_verify_plaintext_presence(plaintext)
|
123
114
|
|
@@ -138,15 +129,6 @@ class AEAD::Cipher
|
|
138
129
|
# @return [String] the original plaintext
|
139
130
|
#
|
140
131
|
def decrypt(nonce, aad, aead)
|
141
|
-
nonce.force_encoding('ASCII-8BIT') if
|
142
|
-
nonce.respond_to?(:force_encoding)
|
143
|
-
|
144
|
-
aad.force_encoding('ASCII-8BIT') if
|
145
|
-
aad.respond_to?(:force_encoding)
|
146
|
-
|
147
|
-
aead.force_encoding('ASCII-8BIT') if
|
148
|
-
aead.respond_to?(:force_encoding)
|
149
|
-
|
150
132
|
_verify_nonce_bytesize(nonce, self.nonce_len)
|
151
133
|
|
152
134
|
self._decrypt(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aead
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Touset
|
8
8
|
autorequire:
|
9
9
|
bindir: script
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: macaddr
|
@@ -256,4 +256,3 @@ test_files:
|
|
256
256
|
- spec/aead/cipher_spec.rb
|
257
257
|
- spec/aead/nonce_spec.rb
|
258
258
|
- spec/spec_helper.rb
|
259
|
-
has_rdoc:
|