Skip to main content

crypt

Function crypt 

Source
pub fn crypt(string: &[u8], salt: &[u8]) -> Vec<u8> ⓘ
Expand description

PHP crypt($string, $salt): the hash, or *0 (*1 when the salt starts with *0) where the salt names no supported algorithm or is invalid.

The algorithms are PHP’s own: blowfish ($2a$, $2b$, $2x$, $2y$), MD5 ($1$), SHA-256 ($5$), SHA-512 ($6$), and FreeSec’s DES (two salt characters) and extended DES (_).