miniproto.crypto.native.scrypt_derive_native
miniproto.crypto.native.scrypt_derive_native
Section titled “miniproto.crypto.native.scrypt_derive_native”scrypt_derive_native(password: bytes, salt: bytes, n: int, r: int, p: int, length: int) -> bytesDerive Scrypt key material through explicit compiled Rust support.
Parameters:
- password (
bytes) – Secret input bytes. - salt (
bytes) – Caller-selected salt bytes. - n (
int) – Power-of-two CPU/memory cost greater than one. - r (
int) – Block-size cost parameter. - p (
int) – Parallelization cost parameter. - length (
int) – Requested output length.
Returns:
bytes– Derived key bytes.
Raises:
RuntimeError– If native Scrypt is unavailable.ValueError– If Scrypt parameters are invalid.
This no-fallback variant does not choose safe parameter values or limit the resource cost requested by the caller.