Windows compile fixed and ao fixed I think...
This commit is contained in:
@@ -1304,7 +1304,7 @@ void CRijndael::Encrypt(char const* in, char* result, size_t n, int iMode)
|
||||
char* presult;
|
||||
if(CBC == iMode) //CBC mode, using the Chain
|
||||
{
|
||||
for(i=0,pin=in,presult=result; i<n/m_blockSize; i++)
|
||||
for(i=0,pin=in,presult=result; i<(int)n/m_blockSize; i++)
|
||||
{
|
||||
Xor(m_chain, pin);
|
||||
EncryptBlock(m_chain, presult);
|
||||
@@ -1315,7 +1315,7 @@ void CRijndael::Encrypt(char const* in, char* result, size_t n, int iMode)
|
||||
}
|
||||
else if(CFB == iMode) //CFB mode, using the Chain
|
||||
{
|
||||
for(i=0,pin=in,presult=result; i<n/m_blockSize; i++)
|
||||
for(i=0,pin=in,presult=result; i<(int)n/m_blockSize; i++)
|
||||
{
|
||||
EncryptBlock(m_chain, presult);
|
||||
Xor(presult, pin);
|
||||
@@ -1326,7 +1326,7 @@ void CRijndael::Encrypt(char const* in, char* result, size_t n, int iMode)
|
||||
}
|
||||
else //ECB mode, not using the Chain
|
||||
{
|
||||
for(i=0,pin=in,presult=result; i<n/m_blockSize; i++)
|
||||
for(i=0,pin=in,presult=result; i<(int)n/m_blockSize; i++)
|
||||
{
|
||||
EncryptBlock(pin, presult);
|
||||
pin += m_blockSize;
|
||||
@@ -1347,7 +1347,7 @@ void CRijndael::Decrypt(char const* in, char* result, size_t n, int iMode)
|
||||
char* presult;
|
||||
if(CBC == iMode) //CBC mode, using the Chain
|
||||
{
|
||||
for(i=0,pin=in,presult=result; i<n/m_blockSize; i++)
|
||||
for(i=0,pin=in,presult=result; i<(int)n/m_blockSize; i++)
|
||||
{
|
||||
DecryptBlock(pin, presult);
|
||||
Xor(presult, m_chain);
|
||||
@@ -1358,7 +1358,7 @@ void CRijndael::Decrypt(char const* in, char* result, size_t n, int iMode)
|
||||
}
|
||||
else if(CFB == iMode) //CFB mode, using the Chain, not using Decrypt()
|
||||
{
|
||||
for(i=0,pin=in,presult=result; i<n/m_blockSize; i++)
|
||||
for(i=0,pin=in,presult=result; i<(int)n/m_blockSize; i++)
|
||||
{
|
||||
EncryptBlock(m_chain, presult);
|
||||
//memcpy(presult, pin, m_blockSize);
|
||||
@@ -1370,7 +1370,7 @@ void CRijndael::Decrypt(char const* in, char* result, size_t n, int iMode)
|
||||
}
|
||||
else //ECB mode, not using the Chain
|
||||
{
|
||||
for(i=0,pin=in,presult=result; i<n/m_blockSize; i++)
|
||||
for(i=0,pin=in,presult=result; i<(int)n/m_blockSize; i++)
|
||||
{
|
||||
DecryptBlock(pin, presult);
|
||||
pin += m_blockSize;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include "linden_common.h"
|
||||
#include "llimagemetadatareader.h"
|
||||
#include "aes.h"
|
||||
#include "llapr.h"
|
||||
#include "llerror.h"
|
||||
const char EMKDU_AES_KEY[] = {0x01,0x00,0x81,0x07,0x63,0x78,0xB6,0xFE,0x6E,0x3F,0xB0,0x12,0xCC,0x65,0x66,0xC1,
|
||||
//#include "llapr.h"
|
||||
//#include "llerror.h"
|
||||
const unsigned char EMKDU_AES_KEY[] = {0x01,0x00,0x81,0x07,0x63,0x78,0xB6,0xFE,0x6E,0x3F,0xB0,0x12,0xCC,0x65,0x66,0xC1,
|
||||
0x81,0x96,0xAC,0xC1,0x3B,0x66,0x0B,0xF7};
|
||||
//#define COMMENT_DEBUGG1ING
|
||||
LLJ2cParser::LLJ2cParser(U8* data,int data_size)
|
||||
@@ -146,7 +146,7 @@ unsigned int LLImageMetaDataReader::ExtractEncodedComment(U8* data,int data_size
|
||||
CRijndael aes;
|
||||
try
|
||||
{
|
||||
aes.MakeKey(EMKDU_AES_KEY,"", 24, 16);
|
||||
aes.MakeKey(reinterpret_cast<const char*>(EMKDU_AES_KEY),"", 24, 16);
|
||||
} catch(std::string error)
|
||||
{
|
||||
llinfos << error << llendl;
|
||||
|
||||
Reference in New Issue
Block a user