public class HashGenerator extends Object
Utility class to encrypt a text by using MD5
Copyright 2011 (C) by Martin Ganserer
| Constructor and Description |
|---|
HashGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static String |
encrypt(String text,
String digester,
String charEncoding)
Perform encryption of given text
|
static String |
encryptMD5(String text)
Perform encryption of given text by using MD5
|
static String |
encryptSHA256(String text)
Perform encryption of given text by using SHA-256
|
public static String encryptMD5(String text) throws NoSuchAlgorithmException, UnsupportedEncodingException
text - NoSuchAlgorithmExceptionUnsupportedEncodingExceptionpublic static String encryptSHA256(String text) throws NoSuchAlgorithmException, UnsupportedEncodingException
text - NoSuchAlgorithmExceptionUnsupportedEncodingExceptionpublic static String encrypt(String text, String digester, String charEncoding) throws NoSuchAlgorithmException, UnsupportedEncodingException
text - digester - charEncoding - NoSuchAlgorithmExceptionUnsupportedEncodingExceptionCopyright © 2016. All rights reserved.