mirror of
https://github.com/cryb-to/cryb-to.git
synced 2025-01-13 15:21:10 +00:00
Use the keystream function like we do for other stream ciphers.
This commit is contained in:
parent
7c348c4d33
commit
8b27222cbb
1 changed files with 1 additions and 1 deletions
|
@ -1977,7 +1977,7 @@ t_rc4(char **desc CRYB_UNUSED, void *arg)
|
||||||
rc4_init(&ctx, CIPHER_MODE_ENCRYPT, t->key, t->keylen);
|
rc4_init(&ctx, CIPHER_MODE_ENCRYPT, t->key, t->keylen);
|
||||||
for (i = offset = 0; i < 18; ++i) {
|
for (i = offset = 0; i < 18; ++i) {
|
||||||
do {
|
do {
|
||||||
rc4_encrypt(&ctx, t_zero, out, 16);
|
rc4_keystream(&ctx, out, 16);
|
||||||
offset += 16;
|
offset += 16;
|
||||||
} while (offset <= t->out[i].offset);
|
} while (offset <= t->out[i].offset);
|
||||||
ret &= t_compare_mem(t->out[i].bytes, out, 16);
|
ret &= t_compare_mem(t->out[i].bytes, out, 16);
|
||||||
|
|
Loading…
Reference in a new issue