public interface EncryptionService
TextEncoding
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String toBeDecrypted)
Decrypts the given text (must be encoded with BASE_64 encoding) using
Ambari's master key found in the environment.
|
String |
decrypt(String toBeDecrypted,
String key)
Decrypts the given text (must be encoded with BASE_64 encoding) using the
given key.
|
String |
decrypt(String toBeDecrypted,
String key,
TextEncoding textEncoding)
Decrypts the given text (must be encoded with the given text encoding) using
the given key.
|
String |
decrypt(String toBeDecrypted,
TextEncoding textEncoding)
Decrypts the given text (must be encoded with the given text encoding) using
Ambari's master key found in the environment.
|
String |
encrypt(String toBeEncrypted)
Encrypts the given text using Ambari's master key found in the environment.
|
String |
encrypt(String toBeEncrypted,
String key)
Encrypts the given text using the given key.
|
String |
encrypt(String toBeEncrypted,
String key,
TextEncoding textEncoding)
Encrypts the given text using the given key.The returned value will be
encoded with the given text encoding.
|
String |
encrypt(String toBeEncrypted,
TextEncoding textEncoding)
Encrypts the given text using Ambari's master key found in the environment.
|
String |
getAmbariMasterKey() |
String encrypt(String toBeEncrypted)
toBeEncrypted
- the text to be encryptedException
- in case any error happened during the encryption processString encrypt(String toBeEncrypted, TextEncoding textEncoding)
toBeEncrypted
- the text to be encryptedtextEncoding
- the text encoding which the encrypted text is encoded withString encrypt(String toBeEncrypted, String key)
toBeEncrypted
- the text to be encryptedkey
- the key to be used for encryptionString encrypt(String toBeEncrypted, String key, TextEncoding textEncoding)
toBeEncrypted
- the text to be encryptedkey
- the key to be used for encryptiontextEncoding
- the text encoding which the encrypted text is encoded withString getAmbariMasterKey()
String decrypt(String toBeDecrypted)
toBeDecrypted
- the text to be decryptedString decrypt(String toBeDecrypted, TextEncoding textEncoding)
toBeDecrypted
- the text to be decryptedtextEncoding
- the text encoding which toBeDecrypted
is encoded withString decrypt(String toBeDecrypted, String key)
toBeDecrypted
- the text to be decryptedkey
- the key to be used for decryptionString decrypt(String toBeDecrypted, String key, TextEncoding textEncoding)
toBeDecrypted
- the text to be decryptedkey
- the key to be used for decryptiontextEncoding
- the text encoding which toBeDecrypted
is encoded withCopyright © 2022 Apache Software Foundation. All rights reserved.