mirror of
https://github.com/vgough/encfs.git
synced 2024-11-25 09:23:13 +01:00
change casts to use C++ style const_cast
git-svn-id: http://encfs.googlecode.com/svn/trunk@44 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
89a2a08b38
commit
61c4ae51f6
@ -144,7 +144,8 @@ int TimedPBKDF2(const char *pass, int passlen,
|
||||
for(;;)
|
||||
{
|
||||
gettimeofday( &start, 0 );
|
||||
int res = PKCS5_PBKDF2_HMAC_SHA1(pass, passlen, salt, saltlen,
|
||||
int res = PKCS5_PBKDF2_HMAC_SHA1(
|
||||
pass, passlen, const_cast<unsigned char*>(salt), saltlen,
|
||||
iter, keylen, out);
|
||||
if(res != 1)
|
||||
return -1;
|
||||
@ -423,9 +424,10 @@ CipherKey SSL_Cipher::newKey(const char *password, int passwdLength,
|
||||
} else
|
||||
{
|
||||
// known iteration length
|
||||
if(PKCS5_PBKDF2_HMAC_SHA1(password, passwdLength, salt, saltLen,
|
||||
iterationCount, _keySize + _ivLength,
|
||||
KeyData(key)) != 1)
|
||||
if(PKCS5_PBKDF2_HMAC_SHA1(
|
||||
password, passwdLength,
|
||||
const_cast<unsigned char*>(salt), saltLen,
|
||||
iterationCount, _keySize + _ivLength, KeyData(key)) != 1)
|
||||
{
|
||||
rWarning("openssl error, PBKDF2 failed");
|
||||
return CipherKey();
|
||||
|
Loading…
Reference in New Issue
Block a user