45#include <StormByte/expected.hxx>
84 std::span<const std::byte> salt,
101 std::span<const std::byte> info,
102 std::size_t outputSize
Shared, wiped container for passwords and raw key material.
Definition password.hxx:108
StormByte::Expected< Secure::Password, Error > ExpectedKey
Expected secret key material or a typed HKDF error.
Definition hkdf.hxx:72
ExpectedKey Extract(Algorithm algorithm, std::span< const std::byte > salt, const Secure::Password &inputKeyMaterial)
HKDF-Extract: derive a pseudorandom key from binary salt and input key material.
ExpectedKey Expand(Algorithm algorithm, const Secure::Password &pseudorandomKey, std::span< const std::byte > info, std::size_t outputSize)
HKDF-Expand: derive binary secret output from a PRK and context information.
Algorithm
Supported HKDF hash functions.
Definition hkdf.hxx:54
@ SHA256
HKDF-SHA-256 (32-byte PRK).
Definition hkdf.hxx:55
@ SHA384
HKDF-SHA-384 (48-byte PRK).
Definition hkdf.hxx:56
Error
Errors returned by HKDF operations.
Definition hkdf.hxx:62
@ OutputTooLong
The output exceeds 255 times the hash output size.
Definition hkdf.hxx:65
@ BackendFailure
The cryptographic backend could not complete the operation.
Definition hkdf.hxx:66
@ InvalidPseudorandomKeySize
The PRK is shorter than the hash output size.
Definition hkdf.hxx:64
@ UnsupportedAlgorithm
The supplied algorithm value is not supported.
Definition hkdf.hxx:63
std::conditional_t< Type::Reference< T >, std::expected< std::reference_wrapper< std::remove_reference_t< T > >, Safe::Shared< E > >, std::expected< T, Safe::Shared< E > > > Expected
#define STORMBYTE_CRYPTO_PUBLIC
Definition visibility.h:53