File: doc/Classes/

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  Halite  >  doc/Classes/  >  Download  
File: doc/Classes/
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Halite
Perform cryptography operations with libsodium
Author: By
Last change:
Date: 5 years ago
Size: 703 bytes



Class file image Download

Password (abstract)

Namespace: \ParagonIE\Halite

A simplified interface for storing encrypted password hashes (hash then encrypt) for user authentication, powered by our symmetric-key cryptography.

Static Methods


> public static hash(string $password, EncryptionKey $secret_key): string

Hash a password (with a randomly generated scrypt salt), then encrypt the hash using our symmetric encryption key.


> public static verify(string $password, string $stored, EncryptionKey $secret_key): boolean

Decrypt the $stored password hash, then verify that it matches the given $password.

For more information send a message to info at phpclasses dot org.