aead 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.1
|
@@ -119,10 +119,10 @@ describe AEAD::Cipher::AES_256_CBC_HMAC_SHA_256 do
|
|
119
119
|
|
120
120
|
ciphertext = cipher.update(plaintext) + cipher.final
|
121
121
|
tag = OpenSSL::HMAC.digest 'SHA256', signing_key,
|
122
|
-
[ 'aes-256-cbc' .length ].pack('Q
|
123
|
-
[ ciphertext .length ].pack('Q
|
124
|
-
[ nonce .length ].pack('Q
|
125
|
-
[ aad .length ].pack('Q
|
122
|
+
[ 'aes-256-cbc' .length ].pack('Q<') << 'aes-256-cbc' <<
|
123
|
+
[ ciphertext .length ].pack('Q<') << ciphertext <<
|
124
|
+
[ nonce .length ].pack('Q<') << nonce <<
|
125
|
+
[ aad .length ].pack('Q<') << aad
|
126
126
|
|
127
127
|
ciphertext + tag
|
128
128
|
end
|
@@ -119,10 +119,10 @@ describe AEAD::Cipher::AES_256_CTR_HMAC_SHA_256 do
|
|
119
119
|
|
120
120
|
ciphertext = cipher.update(plaintext) + cipher.final
|
121
121
|
tag = OpenSSL::HMAC.digest 'SHA256', signing_key,
|
122
|
-
[ 'aes-256-cbc' .length ].pack('Q
|
123
|
-
[ ciphertext .length ].pack('Q
|
124
|
-
[ nonce .length ].pack('Q
|
125
|
-
[ aad .length ].pack('Q
|
122
|
+
[ 'aes-256-cbc' .length ].pack('Q<') << 'aes-256-ctr' <<
|
123
|
+
[ ciphertext .length ].pack('Q<') << ciphertext <<
|
124
|
+
[ nonce .length ].pack('Q<') << nonce <<
|
125
|
+
[ aad .length ].pack('Q<') << aad
|
126
126
|
|
127
127
|
ciphertext + tag
|
128
128
|
end
|