aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/seed/seed_ofb.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-30 12:36:28 +0000
committermarha <marha@users.sourceforge.net>2010-03-30 12:36:28 +0000
commitff48c0d9098080b51ea12710029135916d117806 (patch)
tree96e6af9caf170ba21a1027b24e306a07e27d7b75 /openssl/crypto/seed/seed_ofb.c
parentbb731f5ac92655c4860a41fa818a7a63005f8369 (diff)
downloadvcxsrv-ff48c0d9098080b51ea12710029135916d117806.tar.gz
vcxsrv-ff48c0d9098080b51ea12710029135916d117806.tar.bz2
vcxsrv-ff48c0d9098080b51ea12710029135916d117806.zip
svn merge -r514:HEAD ^/branches/released .
Diffstat (limited to 'openssl/crypto/seed/seed_ofb.c')
-rw-r--r--openssl/crypto/seed/seed_ofb.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/openssl/crypto/seed/seed_ofb.c b/openssl/crypto/seed/seed_ofb.c
index e2f3f57a3..3c8ba33bb 100644
--- a/openssl/crypto/seed/seed_ofb.c
+++ b/openssl/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);
}