public interface CryptoService
| Modifier and Type | Method and Description |
|---|---|
String |
decodeBase64(String encodedValue)
Returns a decoded string based on the provided encodedValue.
|
String |
decryptAes(String encryptedValue)
Returns a plain text string based on the provided encrypted value.
|
String |
encodeBase64(String stringValue)
Returns an encoded string based on the provided stringValue.
|
String |
encryptAes(String value)
Returns an AES encrypted string based on the provided value.
|
String |
sha1Hash(String s)
Returns a SHA1 hashed value of the provided string s.
|
String encryptAes(String value) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
value - A string that will be encrypted.NoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidKeyExceptionIllegalBlockSizeExceptionBadPaddingExceptionString decryptAes(String encryptedValue) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IOException, IllegalBlockSizeException, BadPaddingException
encryptedValue - A string representing the value to be decrypted.NoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidKeyExceptionIOExceptionIllegalBlockSizeExceptionBadPaddingExceptionString sha1Hash(String s) throws NoSuchAlgorithmException, UnsupportedEncodingException
s - A string on which to run the SHA1 hasing algorithm.NoSuchAlgorithmExceptionUnsupportedEncodingExceptionString encodeBase64(String stringValue) throws NoSuchAlgorithmException, UnsupportedEncodingException
stringValue - A string to be encoded.NoSuchAlgorithmExceptionUnsupportedEncodingExceptionString decodeBase64(String encodedValue) throws NoSuchAlgorithmException, UnsupportedEncodingException
encodedValue - A string to be decoded.NoSuchAlgorithmExceptionUnsupportedEncodingExceptionCopyright © 2015. All Rights Reserved.