PHP function crypt() in JavaScript
On the server side I create a password hash: public static function salt() { return '$1$' . StringUtil::random(6, array('encode' => StringUtil::ENCODE_BASE_64)); } public static function hash($password, $salt = null) { return crypt($password, $salt ?: static::salt()); } And on client side I want to do the same using CryptoJS. Is there any analogues in javascript for PHP crypt(), not necessary with CryptoJS? UPD: I want to do this on client side because I don't want to send password to server, but something like clientId crypted with hash, decrypt it on the server and get the hash for the next