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)}")
}Output
true
pub(api) static fn verify(pw: str, encoded: str) -> boolSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
pw | str |
encoded | str |
Returns
bool
Effects
none declared (pure unless the body says otherwise)
Defined in: std/crypto/crypto.oxl:823