diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /plugins/CryptoPP/crypto | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/crypto')
-rw-r--r-- | plugins/CryptoPP/crypto/crc.cpp | 2 | ||||
-rw-r--r-- | plugins/CryptoPP/crypto/des.cpp | 4 | ||||
-rw-r--r-- | plugins/CryptoPP/crypto/gzip.cpp | 4 | ||||
-rw-r--r-- | plugins/CryptoPP/crypto/mars.cpp | 2 | ||||
-rw-r--r-- | plugins/CryptoPP/crypto/osrng.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/plugins/CryptoPP/crypto/crc.cpp b/plugins/CryptoPP/crypto/crc.cpp index 3a2cb4fee3..a27f891ba4 100644 --- a/plugins/CryptoPP/crypto/crc.cpp +++ b/plugins/CryptoPP/crypto/crc.cpp @@ -126,7 +126,7 @@ void CRC32::Update(const byte *s, size_t n) {
word32 crc = m_crc;
- for(; !IsAligned<word32>(s) && n > 0; n--)
+ for (; !IsAligned<word32>(s) && n > 0; n--)
crc = m_tab[CRC32_INDEX(crc) ^ *s++] ^ CRC32_SHIFTED(crc);
while (n >= 4)
diff --git a/plugins/CryptoPP/crypto/des.cpp b/plugins/CryptoPP/crypto/des.cpp index 5002f26588..69c4ba066d 100644 --- a/plugins/CryptoPP/crypto/des.cpp +++ b/plugins/CryptoPP/crypto/des.cpp @@ -292,9 +292,9 @@ void RawDES::RawSetKey(CipherDir dir, const byte *key) for (j=0; j<56; j++) /* rotate pc1 the right amount */
pcr[j] = pc1m[(l=j+totrot[i])<(j<28? 28 : 56) ? l: l-28];
/* rotate left and right halves independently */
- for (j=0; j<48; j++){ /* select bits individually */
+ for (j=0; j<48; j++) { /* select bits individually */
/* check bit that goes to ks[j] */
- if (pcr[pc2[j]-1]){
+ if (pcr[pc2[j]-1]) {
/* mask it in if it's there */
l= j % 6;
ks[j/6] |= bytebit[l] >> 2;
diff --git a/plugins/CryptoPP/crypto/gzip.cpp b/plugins/CryptoPP/crypto/gzip.cpp index c9f75584de..3a52529dc6 100644 --- a/plugins/CryptoPP/crypto/gzip.cpp +++ b/plugins/CryptoPP/crypto/gzip.cpp @@ -65,12 +65,12 @@ void Gunzip::ProcessPrestreamHeader() if (flags & FILENAME) // skip filename
do
- if(!m_inQueue.Get(b)) throw HeaderErr();
+ if (!m_inQueue.Get(b)) throw HeaderErr();
while (b);
if (flags & COMMENTS) // skip comments
do
- if(!m_inQueue.Get(b)) throw HeaderErr();
+ if (!m_inQueue.Get(b)) throw HeaderErr();
while (b);
}
diff --git a/plugins/CryptoPP/crypto/mars.cpp b/plugins/CryptoPP/crypto/mars.cpp index 74aad3a9b9..6e2fe9d94f 100644 --- a/plugins/CryptoPP/crypto/mars.cpp +++ b/plugins/CryptoPP/crypto/mars.cpp @@ -28,7 +28,7 @@ static word32 gen_mask(word32 x) m = (~x ^ (x >> 1)) & 0x7fffffff;
m &= (m >> 1) & (m >> 2); m &= (m >> 3) & (m >> 6);
- if(!m)
+ if (!m)
return 0;
m <<= 1; m |= (m << 1); m |= (m << 2); m |= (m << 4);
diff --git a/plugins/CryptoPP/crypto/osrng.cpp b/plugins/CryptoPP/crypto/osrng.cpp index 6ad488c56f..ff7f034de7 100644 --- a/plugins/CryptoPP/crypto/osrng.cpp +++ b/plugins/CryptoPP/crypto/osrng.cpp @@ -47,7 +47,7 @@ OS_RNG_Err::OS_RNG_Err(const std::string &operation) MicrosoftCryptoProvider::MicrosoftCryptoProvider()
{
- if(!CryptAcquireContext(&m_hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
+ if (!CryptAcquireContext(&m_hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
throw OS_RNG_Err("CryptAcquireContext");
}
|