//PHP password hash:
$hash = password_hash("CLEAR", PASSWORD_DEFAULT);
$ok = password_verify("CLEAR", "HASHED");
//Openssl encript decript:
$hash = openssl_encript("CLEAR", "AES-128-ECB", "SECRETKEY");
$plain = openssl_decript("HASHED", "AES-128-ECB", "SECRETKEY");
//CRYPT:
$hash = crypt("CLEAR TEXT");
$ok = hash_equals("HASHED", crypt("CLEAR", "HASHED"));
//MD5:
$hash = md5("CLEAR");
$ok = md5("CLEAR") == $hash;
---------------
https://code-boxx.com/simple-password-encryption-php/
$hash = password_hash("CLEAR", PASSWORD_DEFAULT);
$ok = password_verify("CLEAR", "HASHED");
//Openssl encript decript:
$hash = openssl_encript("CLEAR", "AES-128-ECB", "SECRETKEY");
$plain = openssl_decript("HASHED", "AES-128-ECB", "SECRETKEY");
//CRYPT:
$hash = crypt("CLEAR TEXT");
$ok = hash_equals("HASHED", crypt("CLEAR", "HASHED"));
//MD5:
$hash = md5("CLEAR");
$ok = md5("CLEAR") == $hash;
---------------
https://code-boxx.com/simple-password-encryption-php/
No comments:
Post a Comment
Beogradsko programiranje=