DLight\Application\Hash
Mô tả: utility hash/verify dựa trên password_hash/password_verify.
Public API
Hash::default(string $string): stringHash::bcrypt(string $string, array $options = []): stringHash::argon2i(string $string, array $options = []): stringHash::verify(string $string, string $hash, bool $error_on_failure = false): bool
Demo
use DLight\Application\Hash;
$hash = Hash::bcrypt('secret', ['cost' => 12]);
if (Hash::verify('secret', $hash)) {
// ok
}