OpenAgentID documentation
Source referencesRust module referenceopenagent-crypto-wasm

openagent-crypto-wasm · kdf_password

Declared module signatures, types, configuration, and source documentation.

Source: openagent-sdk/crates/openagent-crypto-wasm/src/kdf_password.rs. SHA-256: c021bffeadff900136368ce8482ab55ccdec97252df3d516ed985b9deabe67ad.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

kdf_password::hash_password

Hashes password with Argon2id and a fresh random salt.

Returns the PHC-format encoded hash string ($argon2id$v=19$m=...).

Errors

[CryptoError::PasswordHashFailed] if the underlying hasher fails.

pub fn hash_password(password: &[u8]) -> Result<String, CryptoError>;

Source line: 24.

kdf_password::verify_password

Verifies password against a PHC-format encoded Argon2id hash.

Returns Ok(true) on a valid match, Ok(false) on a mismatch, and [CryptoError::PasswordHashFailed] only if the hash string is malformed.

pub fn verify_password(password: &[u8], encoded_hash: &str) -> Result<bool, CryptoError>;

Source line: 41.

On this page