aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/test/crypto_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-04-04 16:25:39 +0200
committerIngela Anderton Andin <[email protected]>2017-04-04 16:25:39 +0200
commitc04e4cd533d9a4185eadda3141e0783b0f5a0fae (patch)
treefe4796bf3371069132cf591b7524ba48adf6a4cf /lib/crypto/test/crypto_SUITE.erl
parent38cd77b3e7afbf3973167c5a339381707e3d95bc (diff)
parentd25ad84195ca42969fbfb017a52aab8c8effc246 (diff)
downloadotp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.tar.gz
otp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.tar.bz2
otp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.zip
Merge branch 'maint-19' into maint
Diffstat (limited to 'lib/crypto/test/crypto_SUITE.erl')
-rw-r--r--lib/crypto/test/crypto_SUITE.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index 7b07cef33f..dbd335c693 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -358,6 +358,16 @@ block_cipher({Type, Key, PlainText}) ->
ct:fail({{crypto, block_decrypt, [Type, Key, CipherText]}, {expected, Plain}, {got, Other}})
end;
+block_cipher({aes_cfb128, Key, IV, PlainText}) ->
+ Plain = iolist_to_binary(PlainText),
+ CipherText = crypto:aes_cfb_128_encrypt(Key, IV, PlainText),
+ case crypto:block_decrypt(aes_cfb128, Key, IV, CipherText) of
+ Plain ->
+ ok;
+ Other ->
+ ct:fail({{crypto, block_decrypt, [aes_cfb128, Key, IV, CipherText]}, {expected, Plain}, {got, Other}})
+ end;
+
block_cipher({Type, Key, IV, PlainText}) ->
Plain = iolist_to_binary(PlainText),
CipherText = crypto:block_encrypt(Type, Key, IV, PlainText),