diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2007-07-24 19:35:21 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2007-07-24 19:35:21 +0000 |
commit | e1d0fa2639db2ab3b1e6c267931299f5be9a1590 (patch) | |
tree | 7895be61105dced0b6ce6ecdec96db64070b8823 /sys/crypto/arc4.h | |
parent | fd111e0fb247537d083f9baa800974cfbc4ea25e (diff) |
add rc4_skip() function that can be used to discard bytes from
the arc4 key stream.
rc4_skip(ctx, len);
is equivalent to:
u_int8_t dummy[len];
rc4_crypt(ctx, dummy, dummy, len);
except that is does not require storage space and that it saves
some cpu cycles.
ok deraadt@
Diffstat (limited to 'sys/crypto/arc4.h')
-rw-r--r-- | sys/crypto/arc4.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/crypto/arc4.h b/sys/crypto/arc4.h index 2bbf9227ceb..b4e96ea44b4 100644 --- a/sys/crypto/arc4.h +++ b/sys/crypto/arc4.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4.h,v 1.1 2003/10/07 07:07:14 markus Exp $ */ +/* $OpenBSD: arc4.h,v 1.2 2007/07/24 19:35:20 damien Exp $ */ /* * Copyright (c) 2003 Markus Friedl <markus@openbsd.org> * @@ -25,3 +25,4 @@ struct rc4_ctx { void rc4_keysetup(struct rc4_ctx *, u_char *, u_int32_t); void rc4_crypt(struct rc4_ctx *, u_char *, u_char *, u_int32_t); +void rc4_skip(struct rc4_ctx *, u_int32_t); |