'\" t .\" Title: kcapi_pbkdf_iteration_count .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: April 2024 .\" Manual: Programming Interface .\" Source: libkcapi Manual 1.4.0 .\" Language: English .\" .TH "KCAPI_PBKDF_ITERATIO" "3" "April 2024" "libkcapi Manual 1\&.4\&.0" "Programming Interface" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" kcapi_pbkdf_iteration_count \- Calculate numbers of iterations for a PBKDF .SH "SYNOPSIS" .HP \w'uint32_t\ kcapi_pbkdf_iteration_count('u .BI "uint32_t kcapi_pbkdf_iteration_count(const\ char\ *\ " "hashname" ", uint64_t\ " "timeshresh" ");" .SH "ARGUMENTS" .PP \fIhashname\fR .RS 4 [in] kernel crypto API name of a keyed hash (e\&.g\&. hmac(sha1)) .RE .PP \fItimeshresh\fR .RS 4 [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\&. .RE .SH "DESCRIPTION" .PP The function measures the time the PBKDF operation takes for different round counts for the given keyed message digest type\&. .PP The result should be taken as the iteration count for a PBKDF operation\&. .PP If an error occurs with the PBKDF calculation, a value of 1<<18 is returned\&. .PP \fIreturn\fR number of iterations a PBKDF should take on this computer\&. .SH "AUTHOR" .PP \fBStephan Mueller\fR <\&smueller@chronox.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br