Clean up code after crypto backend change.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@413 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-01-16 10:38:47 +00:00
parent 6b42f15a95
commit 9da29e8759

View File

@@ -72,7 +72,7 @@ static int pkcs5_pbkdf2(const char *hash,
char T[MAX_PRF_BLOCK_LEN];
int i, k, rc = -EINVAL;
unsigned int u, hLen, l, r;
size_t tmplen = Slen + 4, fLen;
size_t tmplen = Slen + 4;
char *tmp;
tmp = alloca(tmplen);
@@ -180,13 +180,7 @@ static int pkcs5_pbkdf2(const char *hash,
crypt_hmac_write(hmac, U, hLen);
}
//p = gcry_md_read(prf, PRF);
//if (p == NULL)
// goto out;
fLen = hLen;
crypt_hmac_final(hmac, U, fLen);
//memcpy(U, p, hLen);
crypt_hmac_final(hmac, U, hLen);
for (k = 0; (uint) k < hLen; k++)
T[k] ^= U[k];