aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/src/crypto.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-05-21 13:57:43 +0200
committerIngela Anderton Andin <[email protected]>2013-05-27 11:34:47 +0200
commitba77e24590283aa242bb273093152387548636ac (patch)
tree9bcb094df84e529e70697df062e9bb40352daf52 /lib/crypto/src/crypto.erl
parent45c4152d54bd4476f1261182706495c50b837117 (diff)
downloadotp-ba77e24590283aa242bb273093152387548636ac.tar.gz
otp-ba77e24590283aa242bb273093152387548636ac.tar.bz2
otp-ba77e24590283aa242bb273093152387548636ac.zip
crypto: Ctify tests and test new API
Also fix bugs found by new tests
Diffstat (limited to 'lib/crypto/src/crypto.erl')
-rw-r--r--lib/crypto/src/crypto.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 449ff3e872..e042545094 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -310,13 +310,13 @@ supports()->
PubKeyAlgs =
case lists:member(ec, Algs) of
true ->
- {public_keys, [rsa, dss, ecdsa, dh, ecdh]};
+ {public_keys, [rsa, dss, ecdsa, dh, srp, ecdh]};
false ->
- {public_keys, [rsa, dss, dh]}
+ {public_keys, [rsa, dss, dh, srp]}
end,
[{hashs, Algs -- [ec]},
{ciphers, [des_cbc, des_cfb, des3_cbc, des3_cbf, des_ede3, blowfish_cbc,
- blowfish_cfb64, aes_cbc128, aes_cfb128, aes_cbc256, rc2_cbc, aes_ctr, rc4
+ blowfish_cfb64, blowfish_ofb64, blowfish_ecb, aes_cbc128, aes_cfb128, aes_cbc256, rc2_cbc, aes_ctr, rc4
]},
PubKeyAlgs
].
@@ -746,7 +746,7 @@ block_decrypt(blowfish_cbc, Key, Ivec, Data) ->
blowfish_cbc_decrypt(Key, Ivec, Data);
block_decrypt(blowfish_cfb64, Key, Ivec, Data) ->
blowfish_cfb64_decrypt(Key, Ivec, Data);
-block_decrypt(blowfish_ofb, Key, Ivec, Data) ->
+block_decrypt(blowfish_ofb64, Key, Ivec, Data) ->
blowfish_ofb64_decrypt(Key, Ivec, Data);
block_decrypt(aes_cbc128, Key, Ivec, Data) ->
aes_cbc_128_decrypt(Key, Ivec, Data);
@@ -791,8 +791,8 @@ stream_init(aes_ctr, Key, Ivec) ->
{aes_ctr, aes_ctr_stream_init(Key, Ivec)}.
stream_init(rc4, Key) ->
{rc4, rc4_set_key(Key)}.
-stream_encrypt({aes_ctr, State}, Data) ->
- {State, Cipher} = aes_ctr_stream_encrypt(State, Data),
+stream_encrypt({aes_ctr, State0}, Data) ->
+ {State, Cipher} = aes_ctr_stream_encrypt(State0, Data),
{{aes_ctr, State}, Cipher};
stream_encrypt({rc4, State0}, Data) ->
{State, Cipher} = rc4_encrypt_with_state(State0, Data),