---
name: "kcapi_pbkdf_iteration_count"
section: "3"
platform: "linux"
package: "libkcapi-dev"
version: "1.4.0-1+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/kcapi_pbkdf_iteration_count"
---

# kcapi\_pbkdf\_iteration\_count(3)

Calculate numbers of iterations for a PBKDF

## NAME

kcapi\_pbkdf\_iteration\_count - Calculate numbers of iterations for a PBKDF

## SYNOPSIS

**uint32\_t kcapi\_pbkdf\_iteration\_count(const char \*** *hashname***, uint64\_t** *timeshresh***);**

## ARGUMENTS

*hashname*

\[in\] kernel crypto API name of a keyed hash (e.g. hmac(sha1))

*timeshresh*

\[in\] Time duration in nanoseconds that the PBKDF operation shall at least require. If that value is 0, a default of (1\<\<27) nanoseconds is used.

## DESCRIPTION

The function measures the time the PBKDF operation takes for different round counts for the given keyed message digest type.

The result should be taken as the iteration count for a PBKDF operation.

If an error occurs with the PBKDF calculation, a value of 1\<\<18 is returned.

*return* number of iterations a PBKDF should take on this computer.

## AUTHOR

**Stephan Mueller** \<smueller@chronox.de\>

Author.

## COPYRIGHT
