X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fcrypto_backend%2Fpbkdf_check.c;h=69f6bfbd5d9a2e23bc2e5ade96f26853b2acc7b2;hb=bd494d23c5516f5b60ca031862373634d0aba64e;hp=086aa38c46277d7327575d482bc4daacb35a5a7e;hpb=95daec798be76b89ba7d16d6edcc1c8f8b14486e;p=platform%2Fupstream%2Fcryptsetup.git diff --git a/lib/crypto_backend/pbkdf_check.c b/lib/crypto_backend/pbkdf_check.c index 086aa38..69f6bfb 100644 --- a/lib/crypto_backend/pbkdf_check.c +++ b/lib/crypto_backend/pbkdf_check.c @@ -38,7 +38,10 @@ static long time_ms(struct rusage *start, struct rusage *end) } /* This code benchmarks PBKDF and returns iterations/second using specified hash */ -int crypt_pbkdf_check(const char *kdf, const char *hash, uint64_t *iter_secs) +int crypt_pbkdf_check(const char *kdf, const char *hash, + const char *password, size_t password_size, + const char *salt, size_t salt_size, + uint64_t *iter_secs) { struct rusage rstart, rend; int r = 0, step = 0; @@ -54,7 +57,8 @@ int crypt_pbkdf_check(const char *kdf, const char *hash, uint64_t *iter_secs) if (getrusage(RUSAGE_SELF, &rstart) < 0) return -EINVAL; - r = crypt_pbkdf(kdf, hash, "foo", 3, "bar", 3, &buf, 1, iterations); + r = crypt_pbkdf(kdf, hash, password, password_size, salt, + salt_size, &buf, 1, iterations); if (r < 0) return r;