Skip to content

Hashing

The Dox Hash class provides the capability to utilize bcrypt for hashing values.

Hash a password

String secret = 'password';
String hashedPassword = Hash.make(secret);

Verify hashed password

String secret = 'password';
bool verified = Hash.verify(secret, hashedPassword);