summaryrefslogtreecommitdiff
path: root/src/visibility.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-01-26 14:38:13 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-01-26 14:38:13 +0900
commitf21871e241e96148cef3ad4314ad596178cf8967 (patch)
tree4ce8dcacedd71dce64e28edd46327f039a583387 /src/visibility.c
parent5e2d792eb8d9e5aaf1b71205f9298286b8145462 (diff)
downloadlibgcrypt-f21871e241e96148cef3ad4314ad596178cf8967.tar.gz
kdf: Improve new KDF API.
* cipher/kdf.c (struct argon2_thread_data): Change layout. (argon2_iterator): Use struct gcry_kdf_pt_head. (argon2_compute_segment): Rename from argon2_compute_row. (argon2_open): Handle N_THREAD maximum. (_gcry_kdf_iterator): Use struct gcry_kdf_pt_head. (_gcry_kdf_compute_segment): Rename from _gcry_kdf_compute_row. * src/gcrypt-int.h: Update declarations. * src/gcrypt.h.in (struct gcry_kdf_pt_head): Expose the data type. * src/libgcrypt.def, src/libgcrypt.vers: Update. * src/visibility.c, src/visibility.h: Update. * tests/t-kdf.c (start_thread, my_kdf_derive): Follow the change. -- Fixes-commit: bafdb90d97b65db541ea917088ca956e6a364f6b GnuPG-bug-id: 5797 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src/visibility.c')
-rw-r--r--src/visibility.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/visibility.c b/src/visibility.c
index d7f71254..bcae630c 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -1383,19 +1383,21 @@ gcry_kdf_ctl (gcry_kdf_hd_t h, int cmd, void *buffer, size_t buflen)
}
gcry_error_t
-gcry_kdf_iterator (gcry_kdf_hd_t h, int *action, void **arg_p)
+gcry_kdf_iterator (gcry_kdf_hd_t h, int *action_p,
+ struct gcry_kdf_pt_head **t_p)
{
if (!fips_is_operational ())
return gpg_error (fips_not_operational ());
- return gpg_error (_gcry_kdf_iterator (h, action, arg_p));
+ return gpg_error (_gcry_kdf_iterator (h, action_p, t_p));
}
gcry_error_t
-gcry_kdf_compute_row (gcry_kdf_hd_t h, void *arg)
+gcry_kdf_compute_segment (gcry_kdf_hd_t h,
+ const struct gcry_kdf_pt_head *t)
{
if (!fips_is_operational ())
return gpg_error (fips_not_operational ());
- return gpg_error (_gcry_kdf_compute_row (h, arg));
+ return gpg_error (_gcry_kdf_compute_segment (h, t));
}
gcry_error_t