@ProviderType
public interface CryptoService
Modifier and Type | Method and Description |
---|---|
java.lang.String |
decodeBase64(java.lang.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.
|
java.lang.String |
decryptAes(java.lang.String encryptedValue)
Deprecated.
|
java.lang.String |
encodeBase64(java.lang.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.
|
java.lang.String |
encryptAes(java.lang.String value)
Deprecated.
|
char[] |
getKeyStorePassword(java.lang.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(java.lang.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(java.lang.String keyStorePath,
java.lang.String password)
Deprecated.
|
java.lang.String |
sha1Hash(java.lang.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 java.lang.String encryptAes(java.lang.String value) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
value
- A string that will be encrypted.java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
java.security.InvalidKeyException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
@Deprecated java.lang.String decryptAes(java.lang.String encryptedValue) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.io.IOException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
encryptedValue
- A string representing the value to be decrypted.java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
java.security.InvalidKeyException
java.io.IOException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
java.lang.String sha1Hash(java.lang.String s) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
s
- A string on which to run the SHA1 hasing algorithm.java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
java.lang.String encodeBase64(java.lang.String stringValue) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
stringValue
- A string to be encoded.java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
java.lang.String decodeBase64(java.lang.String encodedValue) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
encodedValue
- A string to be decoded.java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
char[] getKeyStorePassword(java.lang.String keyStorePath)
keyStorePath
- A String that represents a unique identifier of the specified keystore.void setKeyStorePassword(java.lang.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(java.lang.String keyStorePath, java.lang.String password) throws java.io.IOException
keyStorePath
- A String that represents a unique identifier of the specified keystore.password
- A String that represents the password of the specified keystore.java.io.IOException
boolean isFrameworkSecure()