From e03bb0606a10f29c8b94909a713a5bb5c69e88b7 Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Thu, 21 Jun 2007 22:40:22 +0000 Subject: merge -r62831:64079 branches/maintenance to release --- indra/llmessage/llblowfishcipher.cpp | 56 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'indra/llmessage/llblowfishcipher.cpp') diff --git a/indra/llmessage/llblowfishcipher.cpp b/indra/llmessage/llblowfishcipher.cpp index d15e4fb69a..609c136d14 100644 --- a/indra/llmessage/llblowfishcipher.cpp +++ b/indra/llmessage/llblowfishcipher.cpp @@ -1,5 +1,5 @@ /** - * @file llblowcipher.cpp + * @file llblowfishcipher.cpp * @brief Wrapper around OpenSSL Blowfish encryption algorithm. * * We do not have OpenSSL headers or libraries on Windows, so this @@ -65,33 +65,33 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) << " iv_len " << iv_length << llendl; - int output_len = 0; - int temp_len = 0; - if (!EVP_EncryptUpdate(&context, - dst, - &output_len, - src, - src_len)) - { - llwarns << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << llendl; - goto ERROR; - } - - // There may be some final data left to encrypt if the input is - // not an exact multiple of the block size. - if (!EVP_EncryptFinal_ex(&context, (unsigned char*)(dst + output_len), &temp_len)) - { - llwarns << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << llendl; - goto ERROR; - } - output_len += temp_len; - - EVP_CIPHER_CTX_cleanup(&context); - return output_len; - -ERROR: - EVP_CIPHER_CTX_cleanup(&context); - return 0; + int output_len = 0; + int temp_len = 0; + if (!EVP_EncryptUpdate(&context, + dst, + &output_len, + src, + src_len)) + { + llwarns << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << llendl; + goto ERROR; + } + + // There may be some final data left to encrypt if the input is + // not an exact multiple of the block size. + if (!EVP_EncryptFinal_ex(&context, (unsigned char*)(dst + output_len), &temp_len)) + { + llwarns << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << llendl; + goto ERROR; + } + output_len += temp_len; + + EVP_CIPHER_CTX_cleanup(&context); + return output_len; + +ERROR: + EVP_CIPHER_CTX_cleanup(&context); + return 0; } // virtual -- cgit v1.3