aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/camellia/cmll_ofb.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/camellia/cmll_ofb.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/camellia/cmll_ofb.c')
-rw-r--r--openssl/crypto/camellia/cmll_ofb.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/openssl/crypto/camellia/cmll_ofb.c b/openssl/crypto/camellia/cmll_ofb.c
index d89cf9f3b..a482befc7 100644
--- a/openssl/crypto/camellia/cmll_ofb.c
+++ b/openssl/crypto/camellia/cmll_ofb.c
@@ -105,37 +105,15 @@
* [including the GNU Public Licence.]
*/
-#ifndef CAMELLIA_DEBUG
-# ifndef NDEBUG
-# define NDEBUG
-# endif
-#endif
-#include <assert.h>
#include <openssl/camellia.h>
-#include "cmll_locl.h"
+#include <openssl/modes.h>
/* The input and output encrypted as though 128bit ofb mode is being
* used. The extra state information to record how much of the
* 128bit block we have used is contained in *num;
*/
void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out,
- const unsigned long length, const CAMELLIA_KEY *key,
+ size_t length, const CAMELLIA_KEY *key,
unsigned char *ivec, int *num) {
-
- unsigned int n;
- unsigned long l=length;
-
- assert(in && out && key && ivec && num);
-
- n = *num;
-
- while (l--) {
- if (n == 0) {
- Camellia_encrypt(ivec, ivec, key);
- }
- *(out++) = *(in++) ^ ivec[n];
- n = (n+1) % CAMELLIA_BLOCK_SIZE;
- }
-
- *num=n;
+ CRYPTO_ofb128_encrypt(in,out,length,key,ivec,num,(block128_f)Camellia_encrypt);
}