Created
July 19, 2018 12:07
-
-
Save CorneAussems/6e40b8d9ccd65ce347ff27ddadf8d9ce to your computer and use it in GitHub Desktop.
Get Liferay Tunnel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.liferay.portal.kernel.security.pwd.* | |
try{ | |
String algorithm = PasswordEncryptorUtil.getDefaultPasswordAlgorithmType(); | |
out.println("Algorithm"+algorithm); | |
String pwdEnc = PasswordEncryptorUtil.encrypt("TEXTTEXTTEXT"); | |
out.println("Password encrypted:"+pwdEnc); | |
String hexPwd = org.apache.commons.codec.binary.Hex.encodeHexString(pwdEnc.getBytes()); | |
out.println("Password hexed:"+hexPwd); | |
}catch(e){ | |
out.println("Oops:"+e) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment