<?php $randomPassword = base64_encode(hash_hmac('sha256', 'example password', openssl_random_pseudo_bytes(32))); $hash = password_hash($randomPassword, PASSWORD_DEFAULT, ['cost' => 12]); var_dump([ $randomPassword, $hash ]); if (password_verify($randomPassword, $hash)) { var_dump(['status' => 'success']); } else { echo 'I can\'t let you do that, Dave!', "\n"; exit(1); }
You have javascript disabled. You will not be able to edit any code.