OxL Справочник OxL
РусскийEnglish

method password.hashWith

logN is the base-2 logarithm of the scrypt cost N (memory is 128 * N * 8 bytes); 10 is for tests only.

Example:

oxl✓ проверяется в CI
use std.crypto { password }

fn main() io, rand {
  let stored = password.hashWith("pw", 10)
  print("{password.verify("pw", stored)}")
}
Вывод
true
pub(api) static fn hashWith(pw: str, logN: i64) -> str  rand

Сложность. time and memory grow with `2^logN`.

С версии. 1.0.0-beta

Параметры

ИмяТип
pwstr
logNi64

Возвращает

str

Эффекты

rand

Определено в: std/crypto/crypto.oxl:802

См. также