KDF.derive
ubyte[] derive(const(ubyte)[] secret, const(ubyte)[] salt, size_t length)Derives a key of the specified length using default parameters.
Parameters
secret | The secret input (e.g., password). |
salt | The salt (should be random and unique). |
length | The desired length of the derived key in bytes. |
Returns
The derived key bytes.
ubyte[] derive(const(ubyte)[] secret, const(ubyte)[] salt, size_t length, KDFParams params)Derives a key of the specified length using the given parameters.
Implementations that do not support a particular parameter should ignore it. Implementations that require a parameter not present in KDFParams should throw CryptoException.
Parameters
secret | The secret input (e.g., password). |
salt | The salt (should be random and unique). |
length | The desired length of the derived key in bytes. |
params | Algorithm-specific parameters. |
Returns
The derived key bytes.
Throws
CryptoException if a required parameter is missing or invalid.