aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/crypto.c
diff options
context:
space:
mode:
authorPaul Guyot <[email protected]>2010-08-20 15:19:58 +0200
committerPaul Guyot <[email protected]>2010-08-20 15:19:58 +0200
commitc1af26a59c46a6f9d295a0374326574157f6d8a5 (patch)
tree1e9dbbc9b5ac43d19e42baf195c86633e98ef321 /lib/crypto/c_src/crypto.c
parentdb6d8ec0a58316aa8fa6bf8d6a91be5996459b84 (diff)
downloadotp-c1af26a59c46a6f9d295a0374326574157f6d8a5.tar.gz
otp-c1af26a59c46a6f9d295a0374326574157f6d8a5.tar.bz2
otp-c1af26a59c46a6f9d295a0374326574157f6d8a5.zip
Fix RC4 stream cipher binding (crypto:rc4_encrypt_with_state/2)
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[])