Package com.atlassian.crowd.crypto
Class DbConfigPasswordCipherEncryptor
java.lang.Object
com.atlassian.crowd.crypto.DbConfigPasswordCipherEncryptor
- All Implemented Interfaces:
Encryptor
-
Constructor Summary
ConstructorsConstructorDescriptionDbConfigPasswordCipherEncryptor(String algorithm, String algorithmKey, EncryptionSettings encryptionSettings, com.atlassian.secrets.api.SecretStoreProvider cipherProvider) -
Method Summary
Modifier and TypeMethodDescriptionbooleanGenerate new encryption key, which should be used to encrypt password in following calls toEncryptor.encrypt(java.lang.String).Decrypt encrypted password, and return its original value.Encrypt plaintext password, and return encrypted value which can later be used in decrypt method to get plaintext password.
-
Constructor Details
-
DbConfigPasswordCipherEncryptor
public DbConfigPasswordCipherEncryptor(String algorithm, String algorithmKey, EncryptionSettings encryptionSettings, com.atlassian.secrets.api.SecretStoreProvider cipherProvider)
-
-
Method Details
-
encrypt
Description copied from interface:EncryptorEncrypt plaintext password, and return encrypted value which can later be used in decrypt method to get plaintext password. -
decrypt
Description copied from interface:EncryptorDecrypt encrypted password, and return its original value.In case of any error during decryption (such as missing decryption key) return
encryptedPassword. -
changeEncryptionKey
public boolean changeEncryptionKey()Description copied from interface:EncryptorGenerate new encryption key, which should be used to encrypt password in following calls toEncryptor.encrypt(java.lang.String).- Specified by:
changeEncryptionKeyin interfaceEncryptor- Returns:
- true if generation was successful, or false when encryption key migration is not supported
-