diff options
author | 2010-10-01 22:54:00 +0000 | |
---|---|---|
committer | 2010-10-01 22:54:00 +0000 | |
commit | f1535dc82c407426dcbc37ddee0ceff3f0c94865 (patch) | |
tree | f73777171acb436d21ef5cb0f2cd241a939ab7f8 /lib/libssl/src/crypto/seed/seed_ofb.c | |
parent | - document new MODCPAN_MODULES (diff) | |
download | wireguard-openbsd-f1535dc82c407426dcbc37ddee0ceff3f0c94865.tar.xz wireguard-openbsd-f1535dc82c407426dcbc37ddee0ceff3f0c94865.zip |
import OpenSSL-1.0.0a
Diffstat (limited to 'lib/libssl/src/crypto/seed/seed_ofb.c')
-rw-r--r-- | lib/libssl/src/crypto/seed/seed_ofb.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/libssl/src/crypto/seed/seed_ofb.c b/lib/libssl/src/crypto/seed/seed_ofb.c index e2f3f57a38c..3c8ba33bb9f 100644 --- a/lib/libssl/src/crypto/seed/seed_ofb.c +++ b/lib/libssl/src/crypto/seed/seed_ofb.c @@ -105,24 +105,12 @@ * [including the GNU Public Licence.] */ -#include "seed_locl.h" -#include <string.h> +#include <openssl/seed.h> +#include <openssl/modes.h> void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const SEED_KEY_SCHEDULE *ks, unsigned char ivec[SEED_BLOCK_SIZE], int *num) { - int n; - - n = *num; - - while (len--) - { - if (n == 0) - SEED_encrypt(ivec, ivec, ks); - *(out++) = *(in++) ^ ivec[n]; - n = (n+1) % SEED_BLOCK_SIZE; - } - - *num = n; + CRYPTO_ofb128_encrypt(in,out,len,ks,ivec,num,(block128_f)SEED_encrypt); } |