cmll-x86_64.pl: bug fix and size optimization of Win64 SEH section.
[openssl.git] / crypto / camellia / cmll_misc.c
index 8edead8..f446891 100644 (file)
@@ -53,7 +53,7 @@
 #include <openssl/camellia.h>
 #include "cmll_locl.h"
 
- const char *CAMELLIA_version="CAMELLIA" OPENSSL_VERSION_PTEXT;
+const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT;
 
 int Camellia_set_key(const unsigned char *userKey, const int bits,
        CAMELLIA_KEY *key)
@@ -62,20 +62,18 @@ int Camellia_set_key(const unsigned char *userKey, const int bits,
                return -1;
        if(bits != 128 && bits != 192 && bits != 256)
                return -2;
-       Camellia_Ekeygen(bits , userKey, key->rd_key);
-       key->bitLength = bits;
+       key->grand_rounds = Camellia_Ekeygen(bits , userKey, key->u.rd_key);
        return 0;
        }
 
 void Camellia_encrypt(const unsigned char *in, unsigned char *out,
        const CAMELLIA_KEY *key)
        {
-       Camellia_EncryptBlock(key->bitLength, in , key->rd_key , out);
+       Camellia_EncryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out);
        }
 
 void Camellia_decrypt(const unsigned char *in, unsigned char *out,
        const CAMELLIA_KEY *key)
        {
-       Camellia_DecryptBlock(key->bitLength, in , key->rd_key , out);
+       Camellia_DecryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out);
        }
-