aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/seed/seed_cfb.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-29 17:08:02 +0000
committermarha <marha@users.sourceforge.net>2010-03-29 17:08:02 +0000
commit15272ab4ed1e6250412fccd48200ed9eae59608f (patch)
treea5996ea67966a778a16565f19dfc2e7c7f49b376 /openssl/crypto/seed/seed_cfb.c
parent3827301b2ea5a45ac009c3bf9f08586ff40b8506 (diff)
downloadvcxsrv-15272ab4ed1e6250412fccd48200ed9eae59608f.tar.gz
vcxsrv-15272ab4ed1e6250412fccd48200ed9eae59608f.tar.bz2
vcxsrv-15272ab4ed1e6250412fccd48200ed9eae59608f.zip
Updated to openssl 1.0.0
Diffstat (limited to 'openssl/crypto/seed/seed_cfb.c')
-rw-r--r--openssl/crypto/seed/seed_cfb.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/openssl/crypto/seed/seed_cfb.c b/openssl/crypto/seed/seed_cfb.c
index 07d878a78..694597dd0 100644
--- a/openssl/crypto/seed/seed_cfb.c
+++ b/openssl/crypto/seed/seed_cfb.c
@@ -105,40 +105,12 @@
* [including the GNU Public Licence.]
*/
-#include "seed_locl.h"
-#include <string.h>
+#include <openssl/seed.h>
+#include <openssl/modes.h>
void SEED_cfb128_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 enc)
{
- int n;
- unsigned char c;
-
- n = *num;
-
- if (enc)
- {
- while (len--)
- {
- if (n == 0)
- SEED_encrypt(ivec, ivec, ks);
- ivec[n] = *(out++) = *(in++) ^ ivec[n];
- n = (n+1) % SEED_BLOCK_SIZE;
- }
- }
- else
- {
- while (len--)
- {
- if (n == 0)
- SEED_encrypt(ivec, ivec, ks);
- c = *(in);
- *(out++) = *(in++) ^ ivec[n];
- ivec[n] = c;
- n = (n+1) % SEED_BLOCK_SIZE;
- }
- }
-
- *num = n;
+ CRYPTO_cfb128_encrypt(in,out,len,ks,ivec,num,enc,(block128_f)SEED_encrypt);
}