Just a memo: deal with -Wcast-qual check. 321/head
authorsvost <ya.nowa@yandex.ru>
Mon, 18 Apr 2016 07:23:06 +0000 (10:23 +0300)
committersvost <ya.nowa@yandex.ru>
Mon, 18 Apr 2016 07:23:06 +0000 (10:23 +0300)
int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md,
                   const unsigned char *salt,
                   const unsigned char *data, int datal, int count,
                   unsigned char *key,unsigned char *iv);

src/crypter.cpp

index 2a6f36d..04c25e7 100644 (file)
@@ -22,7 +22,7 @@ bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::v
     if (nDerivationMethod == 0)
     {
         i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha512(), &chSalt[0],
-                          (unsigned char *)&strKeyData[0], strKeyData.size(), nRounds, chKey, chIV);
+                          (const unsigned char *)&strKeyData[0], strKeyData.size(), nRounds, chKey, chIV);
     }
 
     if (i != (int)WALLET_CRYPTO_KEY_SIZE)