Browse Source

increased built-in cc20's speed

pull/400/head
Logan007 4 years ago
parent
commit
cc7430ae66
  1. 2
      src/cc20.c

2
src/cc20.c

@ -221,11 +221,11 @@ int cc20_crypt (unsigned char *out, const unsigned char *in, size_t in_len,
in_len -= 64; in_len -= 64;
} }
tmp_len = tmp_len - in_len;
if(in_len > 0) { if(in_len > 0) {
chacha20_block_next(ctx); chacha20_block_next(ctx);
tmp_len -= in_len;
while(in_len > 0) { while(in_len > 0) {
out[tmp_len] = in[tmp_len] ^ keystream8[tmp_len%64]; out[tmp_len] = in[tmp_len] ^ keystream8[tmp_len%64];
tmp_len++; tmp_len++;

Loading…
Cancel
Save