X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fcamellia%2Fcmll_misc.c;h=cbd250227becca0a263528b298495b40475d571a;hp=f44689124b4a64e0d682c2d27125a4c177e92043;hb=82e586a90b18fa91fb2756af4c36cc70ff097f6d;hpb=436bdcff4ec96d086b9f4e80accb314e4a4514e1 diff --git a/crypto/camellia/cmll_misc.c b/crypto/camellia/cmll_misc.c index f44689124b..cbd250227b 100644 --- a/crypto/camellia/cmll_misc.c +++ b/crypto/camellia/cmll_misc.c @@ -7,7 +7,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in @@ -48,32 +48,33 @@ * ==================================================================== * */ - + #include +#include #include #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) - { - if(!userKey || !key) - return -1; - if(bits != 128 && bits != 192 && bits != 256) - return -2; - key->grand_rounds = Camellia_Ekeygen(bits , userKey, key->u.rd_key); - return 0; - } +int private_Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key) +{ + if (!userKey || !key) + return -1; + if (bits != 128 && bits != 192 && bits != 256) + return -2; + 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_Rounds(key->grand_rounds, in , key->u.rd_key , out); - } + const CAMELLIA_KEY *key) +{ + 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_Rounds(key->grand_rounds, in , key->u.rd_key , out); - } + const CAMELLIA_KEY *key) +{ + Camellia_DecryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); +}