OxL Reference

method password.verify

Checks pw against a text made by hash; a malformed text is simply false.

Example:

oxl✓ checked in CI
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) -> bool

Since. 1.0.0-beta

Parameters

NameType
pwstr
encodedstr

Returns

bool

Effects

none declared (pure unless the body says otherwise)

Defined in: std/crypto/crypto.oxl:823

See also