method password.verify
Checks pw against a text made by hash; a malformed text is simply false.
Example:
use std.crypto { password }
fn main() io, rand {
let h = password.hashWith("pw", 10)
print("{password.verify("pw", h)}")
}Вывод
true
pub(api) static fn verify(pw: str, encoded: str) -> boolС версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
pw | str |
encoded | str |
Возвращает
bool
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/crypto/crypto.oxl:823