Package com.atlassian.bamboo.mock
Class MockSecretEncryptionService
java.lang.Object
com.atlassian.bamboo.mock.MockSecretEncryptionService
- All Implemented Interfaces:
SecretEncryptionService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringDecrypt give string.@NotNull StringdecryptIfDecryptable(@NotNull String encryptedSecret) Decrypts secret if possible or returns original string if not.@NotNull StringEncrypts the supplied string.booleanisDecryptable(@NotNull String encryptedSecret) booleanisEncrypted(@NotNull String string) Whether the supplied string has been encrypted by this service.
-
Constructor Details
-
MockSecretEncryptionService
public MockSecretEncryptionService()
-
-
Method Details
-
isEncrypted
Description copied from interface:SecretEncryptionServiceWhether the supplied string has been encrypted by this service.- Specified by:
isEncryptedin interfaceSecretEncryptionService
-
isDecryptable
- Specified by:
isDecryptablein interfaceSecretEncryptionService- Returns:
- true if Bamboo can decrypt given value.
-
decrypt
Decrypt give string. Has logic to fail on broken strings, which doesn't follow pattern fromencrypt(String)- Specified by:
decryptin interfaceSecretEncryptionService
-
decryptIfDecryptable
Description copied from interface:SecretEncryptionServiceDecrypts secret if possible or returns original string if not.- Specified by:
decryptIfDecryptablein interfaceSecretEncryptionService
-
encrypt
Description copied from interface:SecretEncryptionServiceEncrypts the supplied string.- Specified by:
encryptin interfaceSecretEncryptionService- Returns:
- "BAMSCRTyoursecret#CHARACTERSCOUNT encrypted"
-