List of usage examples for com.liferay.portal.kernel.util DigesterUtil digest
public static String digest(String text)
From source file:com.liferay.petra.encryptor.Encryptor.java
License:Open Source License
/** * @deprecated As of 1.0.0, replaced by {@link DigesterUtil#digest(String)} */// www . j a v a2 s . c o m @Deprecated public static String digest(String text) { return DigesterUtil.digest(text); }
From source file:com.liferay.portlet.wiki.translators.BaseTranslator.java
License:Open Source License
protected String protectText(String content, String markupRegex) { Matcher matcher = Pattern.compile(markupRegex, Pattern.MULTILINE | Pattern.DOTALL).matcher(content); StringBuffer sb = new StringBuffer(); while (matcher.find()) { String protectedText = matcher.group(); String hash = DigesterUtil.digest(protectedText); matcher.appendReplacement(sb, "$1" + hash + "$3"); _protectedMap.put(hash, matcher.group(2)); }/*from ww w . ja v a 2s . com*/ matcher.appendTail(sb); return sb.toString(); }
From source file:com.liferay.util.Encryptor.java
License:Open Source License
public static String digest(String text) { return DigesterUtil.digest(text); }
From source file:com.liferay.wiki.internal.translator.BaseTranslator.java
License:Open Source License
protected String protectText(String content, String markupRegex) { Pattern pattern = Pattern.compile(markupRegex, Pattern.MULTILINE | Pattern.DOTALL); Matcher matcher = pattern.matcher(content); StringBuffer sb = new StringBuffer(); while (matcher.find()) { String protectedText = matcher.group(); String hash = DigesterUtil.digest(protectedText); matcher.appendReplacement(sb, "$1" + hash + "$3"); _protectedMap.put(hash, matcher.group(2)); }/*from w w w . j a v a 2s . c om*/ matcher.appendTail(sb); return sb.toString(); }