mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Cleared "signed/unsigned" warning on Debian 8/i686. ROUNDS was already unsigned; suspect this was a compiler or port issue
This commit is contained in:
parent
4d8ac2db7c
commit
a8ca289b00
@ -17,7 +17,7 @@ void Blowfish::Base::UncheckedSetKey(const byte *key_string, unsigned int keylen
|
||||
memcpy(sbox, s_init, sizeof(s_init));
|
||||
|
||||
// Xor key string into encryption key vector
|
||||
for (i=0 ; i<ROUNDS+2 ; ++i)
|
||||
for (i=0 ; i<static_cast<unsigned int>(ROUNDS)+2 ; ++i)
|
||||
{
|
||||
data = 0 ;
|
||||
for (k=0 ; k<4 ; ++k )
|
||||
@ -27,7 +27,7 @@ void Blowfish::Base::UncheckedSetKey(const byte *key_string, unsigned int keylen
|
||||
|
||||
crypt_block(dspace, pbox);
|
||||
|
||||
for (i=0; i<ROUNDS; i+=2)
|
||||
for (i=0; i<static_cast<unsigned int>(ROUNDS); i+=2)
|
||||
crypt_block(pbox+i, pbox+i+2);
|
||||
|
||||
crypt_block(pbox+ROUNDS, sbox);
|
||||
@ -36,7 +36,7 @@ void Blowfish::Base::UncheckedSetKey(const byte *key_string, unsigned int keylen
|
||||
crypt_block(sbox+i, sbox+i+2);
|
||||
|
||||
if (!IsForwardTransformation())
|
||||
for (i=0; i<(ROUNDS+2)/2; i++)
|
||||
for (i=0; i<(static_cast<unsigned int>(ROUNDS)+2)/2; i++)
|
||||
std::swap(pbox[i], pbox[ROUNDS+1-i]);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// blowfish.h - written and placed in the public domain by Wei Dai
|
||||
|
||||
#ifndef CRYPTOPP_BLOWFISH_H
|
||||
#define CRYPTOPP_BLOWFISH_H
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user