mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 01:49:41 +00:00
Add curly braces for Clang builds
This commit is contained in:
parent
143b9d2619
commit
cb914d6f31
@ -33,7 +33,7 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||
#if defined(CRYPTOPP_WIN32_AVAILABLE)
|
||||
static TimerWord InitializePerformanceCounterFrequency()
|
||||
{
|
||||
LARGE_INTEGER freq = {0,0};
|
||||
LARGE_INTEGER freq = {{0,0}};
|
||||
if (!QueryPerformanceFrequency(&freq))
|
||||
throw Exception(Exception::OTHER_ERROR, "Timer: QueryPerformanceFrequency failed with error " + IntToString(GetLastError()));
|
||||
return freq.QuadPart;
|
||||
@ -91,7 +91,7 @@ TimerWord Timer::GetCurrentTimerValue()
|
||||
{
|
||||
#if defined(CRYPTOPP_WIN32_AVAILABLE)
|
||||
// Use the first union member to avoid an uninitialized warning
|
||||
LARGE_INTEGER now = {0,0};
|
||||
LARGE_INTEGER now = {{0,0}};
|
||||
if (!QueryPerformanceCounter(&now))
|
||||
throw Exception(Exception::OTHER_ERROR, "Timer: QueryPerformanceCounter failed with error " + IntToString(GetLastError()));
|
||||
return now.QuadPart;
|
||||
|
16
shark.cpp
16
shark.cpp
@ -15,14 +15,14 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||
static word64 SHARKTransform(word64 a)
|
||||
{
|
||||
static const byte iG[8][8] = {
|
||||
0xe7, 0x30, 0x90, 0x85, 0xd0, 0x4b, 0x91, 0x41,
|
||||
0x53, 0x95, 0x9b, 0xa5, 0x96, 0xbc, 0xa1, 0x68,
|
||||
0x02, 0x45, 0xf7, 0x65, 0x5c, 0x1f, 0xb6, 0x52,
|
||||
0xa2, 0xca, 0x22, 0x94, 0x44, 0x63, 0x2a, 0xa2,
|
||||
0xfc, 0x67, 0x8e, 0x10, 0x29, 0x75, 0x85, 0x71,
|
||||
0x24, 0x45, 0xa2, 0xcf, 0x2f, 0x22, 0xc1, 0x0e,
|
||||
0xa1, 0xf1, 0x71, 0x40, 0x91, 0x27, 0x18, 0xa5,
|
||||
0x56, 0xf4, 0xaf, 0x32, 0xd2, 0xa4, 0xdc, 0x71,
|
||||
{0xe7, 0x30, 0x90, 0x85, 0xd0, 0x4b, 0x91, 0x41},
|
||||
{0x53, 0x95, 0x9b, 0xa5, 0x96, 0xbc, 0xa1, 0x68},
|
||||
{0x02, 0x45, 0xf7, 0x65, 0x5c, 0x1f, 0xb6, 0x52},
|
||||
{0xa2, 0xca, 0x22, 0x94, 0x44, 0x63, 0x2a, 0xa2},
|
||||
{0xfc, 0x67, 0x8e, 0x10, 0x29, 0x75, 0x85, 0x71},
|
||||
{0x24, 0x45, 0xa2, 0xcf, 0x2f, 0x22, 0xc1, 0x0e},
|
||||
{0xa1, 0xf1, 0x71, 0x40, 0x91, 0x27, 0x18, 0xa5},
|
||||
{0x56, 0xf4, 0xaf, 0x32, 0xd2, 0xa4, 0xdc, 0x71}
|
||||
};
|
||||
|
||||
word64 result=0;
|
||||
|
@ -23,10 +23,10 @@ static void SquareTransform (word32 in[4], word32 out[4])
|
||||
{
|
||||
static const byte G[4][4] =
|
||||
{
|
||||
0x02U, 0x01U, 0x01U, 0x03U,
|
||||
0x03U, 0x02U, 0x01U, 0x01U,
|
||||
0x01U, 0x03U, 0x02U, 0x01U,
|
||||
0x01U, 0x01U, 0x03U, 0x02U
|
||||
{0x02U, 0x01U, 0x01U, 0x03U},
|
||||
{0x03U, 0x02U, 0x01U, 0x01U},
|
||||
{0x01U, 0x03U, 0x02U, 0x01U},
|
||||
{0x01U, 0x01U, 0x03U, 0x02U}
|
||||
};
|
||||
|
||||
GF256 gf256(0xf5);
|
||||
|
@ -12,7 +12,7 @@
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
const byte Twofish::Base::q[2][256] = {
|
||||
0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78,
|
||||
{0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78,
|
||||
0xE4, 0xDD, 0xD1, 0x38, 0x0D, 0xC6, 0x35, 0x98, 0x18, 0xF7, 0xEC, 0x6C,
|
||||
0x43, 0x75, 0x37, 0x26, 0xFA, 0x13, 0x94, 0x48, 0xF2, 0xD0, 0x8B, 0x30,
|
||||
0x84, 0x54, 0xDF, 0x23, 0x19, 0x5B, 0x3D, 0x59, 0xF3, 0xAE, 0xA2, 0x82,
|
||||
@ -33,9 +33,9 @@ const byte Twofish::Base::q[2][256] = {
|
||||
0x7E, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34, 0x6E, 0x50, 0xDE, 0x68,
|
||||
0x65, 0xBC, 0xDB, 0xF8, 0xC8, 0xA8, 0x2B, 0x40, 0xDC, 0xFE, 0x32, 0xA4,
|
||||
0xCA, 0x10, 0x21, 0xF0, 0xD3, 0x5D, 0x0F, 0x00, 0x6F, 0x9D, 0x36, 0x42,
|
||||
0x4A, 0x5E, 0xC1, 0xE0,
|
||||
0x4A, 0x5E, 0xC1, 0xE0},
|
||||
|
||||
0x75, 0xF3, 0xC6, 0xF4, 0xDB, 0x7B, 0xFB, 0xC8, 0x4A, 0xD3, 0xE6, 0x6B,
|
||||
{0x75, 0xF3, 0xC6, 0xF4, 0xDB, 0x7B, 0xFB, 0xC8, 0x4A, 0xD3, 0xE6, 0x6B,
|
||||
0x45, 0x7D, 0xE8, 0x4B, 0xD6, 0x32, 0xD8, 0xFD, 0x37, 0x71, 0xF1, 0xE1,
|
||||
0x30, 0x0F, 0xF8, 0x1B, 0x87, 0xFA, 0x06, 0x3F, 0x5E, 0xBA, 0xAE, 0x5B,
|
||||
0x8A, 0x00, 0xBC, 0x9D, 0x6D, 0xC1, 0xB1, 0x0E, 0x80, 0x5D, 0xD2, 0xD5,
|
||||
@ -56,7 +56,7 @@ const byte Twofish::Base::q[2][256] = {
|
||||
0x6E, 0x47, 0xDF, 0x34, 0x35, 0x6A, 0xCF, 0xDC, 0x22, 0xC9, 0xC0, 0x9B,
|
||||
0x89, 0xD4, 0xED, 0xAB, 0x12, 0xA2, 0x0D, 0x52, 0xBB, 0x02, 0x2F, 0xA9,
|
||||
0xD7, 0x61, 0x1E, 0xB4, 0x50, 0x04, 0xF6, 0xC2, 0x16, 0x25, 0x86, 0x56,
|
||||
0x55, 0x09, 0xBE, 0x91
|
||||
0x55, 0x09, 0xBE, 0x91}
|
||||
};
|
||||
|
||||
const word32 Twofish::Base::mds[4][256] = {
|
||||
|
Loading…
Reference in New Issue
Block a user