public static String getTypeId(String subjectTemplate, String bodyTemplateName) { return CryptoUtil.getHashSHA1(subjectTemplate + bodyTemplateName); } }
public static String getTypeId(String subjectTemplate, String bodyTemplateName) { return CryptoUtil.getHashSHA1(subjectTemplate + bodyTemplateName); } }
/** * Calculates the SHA1 hash of the string. * * @param text * @return sha1 hash of the string */ public static String getHashSHA1(String text) { byte[] bytes = text.getBytes(StandardCharsets.ISO_8859_1); return getHashSHA1(bytes); }
String shaPassword = CryptoUtil.getHashSHA1(password); if (storedPassword.substring("{SHA1}".length()).equals(shaPassword)) { log.trace("Unsalted SHA-1 hashed password matched for user '{}'", username);
String shaPassword = CryptoUtil.getHashSHA1(password); if (storedPassword.substring("{SHA1}".length()).equals(shaPassword)) { log.trace("Unsalted SHA-1 hashed password matched for user '{}'", username);