xxxxxxxxxx
$content_message = "<p class='notification'>Please type in and confirm your new password.</p>"
. '<form method="post" id="change_password" action="'.htmlspecialchars(
. $_SERVER["PHP_SELF"]
. '?id='
. $id
. '&code='
. $code
. ).'">'
xxxxxxxxxx
public static String fileSha256ToBase64(File file) throws NoSuchAlgorithmException, IOException {
byte[] data = Files.readAllBytes(file.toPath());
MessageDigest digester = MessageDigest.getInstance("SHA-256");
digester.update(data);
return Base64.getEncoder().encodeToString(digester.digest());
}