XU XUv0.13.1
中文

#crypto/pbkdf2

import: #crypto/pbkdf2

counts: 1 functions, 0 methods, 0 types, 0 constants, 0 method sets

PBKDF2 key derivation function per RFC 2898 / RFC 8018 (using HMAC-SHA-256). Aligned with `.org/x/crypto/pbkdf2`. Key derives a key of key_len bytes from password and salt using iter iterations of HMAC-SHA-256.

key

XuAPI
pub fn key(password &string, salt &string, iter int, key_len int) string

Purpose

key derives a cryptographic key of key_len bytes from password and salt across iter rounds. Throws on failure; handle the error or propagate it to the caller.

Parameters

password &string
password (read-only borrow; caller keeps the original; type &string)
salt &string
salt (read-only borrow; caller keeps the original; type &string)
iter int
iter (int)
key_len int
key_len (int)

Returns

string — result string