public interface CryptoService
| Modifier and Type | Method and Description |
|---|---|
String |
decodeBase64(String encodedValue)
Returns a decoded string based on the provided encodedValue.
|
char[] |
decryptAes(char[] encryptedValue)
Returns a char array based on the provided encrypted value.
|
String |
decryptAes(String encryptedValue)
Deprecated.
|
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.
|
char[] |
getKeyStorePassword(String keyStorePath)
Takes a keystore path and returns the corresponding password that can be used to access to the data saved in the specified keystore.
|
void |
setKeyStorePassword(String keyStorePath,
String password)
Takes a keystore path as a String and a char array representing a password that has to be stored for the specified keystore.
|
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.NoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidKeyExceptionIllegalBlockSizeExceptionBadPaddingException@Deprecated String decryptAes(String encryptedValue) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IOException, IllegalBlockSizeException, BadPaddingException
encryptedValue - A string representing the value to be decrypted.NoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidKeyExceptionIOExceptionIllegalBlockSizeExceptionBadPaddingExceptionchar[] decryptAes(char[] encryptedValue)
throws KuraException
encryptedValue - A char array representing the value to be decrypted.KuraExceptionString 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.NoSuchAlgorithmExceptionUnsupportedEncodingExceptionchar[] getKeyStorePassword(String keyStorePath)
keyStorePath - A String that represents a unique identifier of the specified keystore.void setKeyStorePassword(String keyStorePath, String password) throws IOException
keyStorePath - A String that represents a unique identifier of the specified keystore.password - A char array that represents the password of the specified keystore.IOExceptionCopyright © 2015. All Rights Reserved.