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.
|
char[] |
encryptAes(char[] value)
Returns an AES encrypted char array based on the provided value.
|
String |
encryptAes(String value)
Deprecated.
|
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.
|
boolean |
isFrameworkSecure()
Answers if the Kura framework is running in security mode.
|
void |
setKeyStorePassword(String keyStorePath,
char[] password)
Takes a keystore path as a String and a char array representing a password
that has to be stored for the specified keystore.
|
void |
setKeyStorePassword(String keyStorePath,
String password)
Deprecated.
|
String |
sha1Hash(String s)
Returns a SHA1 hashed value of the provided string s.
|
char[] encryptAes(char[] value) throws KuraException
value
- A char array that will be encrypted.KuraException
char[] decryptAes(char[] encryptedValue) throws KuraException
encryptedValue
- A char array representing the value to be decrypted.KuraException
@Deprecated String encryptAes(String value) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
value
- A string that will be encrypted.NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
@Deprecated 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
char[] getKeyStorePassword(String keyStorePath)
keyStorePath
- A String that represents a unique identifier of the specified keystore.void setKeyStorePassword(String keyStorePath, char[] password) throws KuraException
keyStorePath
- A String that represents a unique identifier of the specified keystore.password
- A char array that represents the password of the specified keystore.KuraException
@Deprecated void setKeyStorePassword(String keyStorePath, String password) throws IOException
keyStorePath
- A String that represents a unique identifier of the specified keystore.password
- A String that represents the password of the specified keystore.IOException
boolean isFrameworkSecure()
Copyright © 2016. All Rights Reserved.