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.NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
String decryptAes(String encryptedValue) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IOException, IllegalBlockSizeException, BadPaddingException
encryptedValue
- A string representing the value to be decrypted.NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IOException
IllegalBlockSizeException
BadPaddingException
String sha1Hash(String s) throws NoSuchAlgorithmException, UnsupportedEncodingException
s
- A string on which to run the SHA1 hasing algorithm.NoSuchAlgorithmException
UnsupportedEncodingException
String encodeBase64(String stringValue) throws NoSuchAlgorithmException, UnsupportedEncodingException
stringValue
- A string to be encoded.NoSuchAlgorithmException
UnsupportedEncodingException
String decodeBase64(String encodedValue) throws NoSuchAlgorithmException, UnsupportedEncodingException
encodedValue
- A string to be decoded.NoSuchAlgorithmException
UnsupportedEncodingException
Copyright © 2014. All Rights Reserved.