diff options
author | Andy Polyakov <appro@openssl.org> | 2008-12-23 11:33:01 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2008-12-23 11:33:01 +0000 |
commit | 5d48a66a6a4bc27b54d32721f7183077489c2e5f (patch) | |
tree | 27b158f856e0636bf349375c047a38b1fc97ee7c /crypto/seed/seed_ofb.c | |
parent | 63fc7f848d4e047c3bd0f4a1c7e843191b2e9f0a (diff) |
Engage crypto/modes.
Diffstat (limited to 'crypto/seed/seed_ofb.c')
-rw-r--r-- | crypto/seed/seed_ofb.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/crypto/seed/seed_ofb.c b/crypto/seed/seed_ofb.c index e2f3f57a38..3c8ba33bb9 100644 --- a/crypto/seed/seed_ofb.c +++ b/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); } |