aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/crypto.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-08-30 13:23:16 +0200
committerRickard Green <[email protected]>2010-08-30 13:25:13 +0200
commit0bcb7009fe4f3bbdf630c226d7e7335f9c005cf0 (patch)
treeb997b95c74db8b383d8656bb2b92b899ba8bd22f /lib/crypto/c_src/crypto.c
parent4f100fff5844f7af08b1d9be23e990e4a48b27de (diff)
parentc1af26a59c46a6f9d295a0374326574157f6d8a5 (diff)
downloadotp-0bcb7009fe4f3bbdf630c226d7e7335f9c005cf0.tar.gz
otp-0bcb7009fe4f3bbdf630c226d7e7335f9c005cf0.tar.bz2
otp-0bcb7009fe4f3bbdf630c226d7e7335f9c005cf0.zip
Merge branch 'pg/fix-crypto-rc4_encrypt_with_state' into dev
* pg/fix-crypto-rc4_encrypt_with_state: Fix RC4 stream cipher binding (crypto:rc4_encrypt_with_state/2) OTP-8781 - RC4 stream cipher didn't work. This since the new NIF implementation of crypto:rc4_encrypt_with_state/2 introduced in crypto-2.0 didn't return an updated state. (Thanks to Paul Guyot)
Diffstat (limited to 'lib/crypto/c_src/crypto.c')
-rw-r--r--lib/crypto/c_src/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 68079f06c7..8823bba3b6 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -950,7 +950,7 @@ static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_N
RC4(rc4_key, data.size, data.data,
enif_make_new_binary(env, data.size, &new_data));
- return enif_make_tuple2(env,argv[0],new_data);
+ return enif_make_tuple2(env,new_state,new_data);
}
static ERL_NIF_TERM rc2_40_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])