public class AESEncryptionService extends Object implements EncryptionService
Constructor and Description |
---|
AESEncryptionService() |
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() |
public String encrypt(String toBeEncrypted)
EncryptionService
encrypt
in interface EncryptionService
toBeEncrypted
- the text to be encryptedpublic String encrypt(String toBeEncrypted, TextEncoding textEncoding)
EncryptionService
encrypt
in interface EncryptionService
toBeEncrypted
- the text to be encryptedtextEncoding
- the text encoding which the encrypted text is encoded withpublic String encrypt(String toBeEncrypted, String key)
EncryptionService
encrypt
in interface EncryptionService
toBeEncrypted
- the text to be encryptedkey
- the key to be used for encryptionpublic String encrypt(String toBeEncrypted, String key, TextEncoding textEncoding)
EncryptionService
encrypt
in interface EncryptionService
toBeEncrypted
- the text to be encryptedkey
- the key to be used for encryptiontextEncoding
- the text encoding which the encrypted text is encoded withpublic final String getAmbariMasterKey()
getAmbariMasterKey
in interface EncryptionService
public String decrypt(String toBeDecrypted)
EncryptionService
decrypt
in interface EncryptionService
toBeDecrypted
- the text to be decryptedpublic String decrypt(String toBeDecrypted, TextEncoding textEncoding)
EncryptionService
decrypt
in interface EncryptionService
toBeDecrypted
- the text to be decryptedtextEncoding
- the text encoding which toBeDecrypted
is encoded withpublic String decrypt(String toBeDecrypted, String key)
EncryptionService
decrypt
in interface EncryptionService
toBeDecrypted
- the text to be decryptedkey
- the key to be used for decryptionpublic String decrypt(String toBeDecrypted, String key, TextEncoding textEncoding)
EncryptionService
decrypt
in interface EncryptionService
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.