aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-07-04 17:26:29 +0200
committerSverker Eriksson <[email protected]>2012-07-04 17:33:50 +0200
commit6faad239766accdcc007540f0b8b38d4709cd435 (patch)
treeae52b182816078c3fede13e65483b12d24e0a207 /lib/crypto/c_src
parent14f6a66f6410e1665ad39e95158420b0a45634d6 (diff)
downloadotp-6faad239766accdcc007540f0b8b38d4709cd435.tar.gz
otp-6faad239766accdcc007540f0b8b38d4709cd435.tar.bz2
otp-6faad239766accdcc007540f0b8b38d4709cd435.zip
crypto: Allow aes_cfb_128_{en|de}crypt to accept unaligned data
Remove the need for padding up to 16-byte multiple.
Diffstat (limited to 'lib/crypto/c_src')
-rw-r--r--lib/crypto/c_src/crypto.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 4be593e208..a6a81d6fe2 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -954,8 +954,7 @@ static ERL_NIF_TERM aes_cfb_128_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TE
if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 16
|| !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16
- || !enif_inspect_iolist_as_binary(env, argv[2], &text)
- || text.size % 16 != 0) {
+ || !enif_inspect_iolist_as_binary(env, argv[2], &text)) {
return enif_make_badarg(env);
}