Class RemoteAgentSecretEncryptionService
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.agent.remote.crypto.RemoteAgentSecretEncryptionService
-
- All Implemented Interfaces:
SecretEncryptionService
@NotThreadSafe public class RemoteAgentSecretEncryptionService extends Object implements SecretEncryptionService
-
-
Constructor Summary
Constructors Modifier Constructor Description RemoteAgentSecretEncryptionService()
protected
RemoteAgentSecretEncryptionService(boolean cacheCiphers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
decrypt(@NotNull String encryptedSecret)
Decrypts the supplied secret.@NotNull String
decryptIfDecryptable(@NotNull String encryptedSecret)
Decrypts secret if possible or returns original string if not.@NotNull String
encrypt(@NotNull String secretToEncrypt)
Encrypts the supplied string.boolean
isDecryptable(@NotNull String encryptedSecret)
boolean
isEncrypted(@NotNull String string)
Whether the supplied string has been encrypted by this service.
-
-
-
Method Detail
-
isEncrypted
public boolean isEncrypted(@NotNull @NotNull String string)
Description copied from interface:SecretEncryptionService
Whether the supplied string has been encrypted by this service.- Specified by:
isEncrypted
in interfaceSecretEncryptionService
-
isDecryptable
public boolean isDecryptable(@NotNull @NotNull String encryptedSecret)
- Specified by:
isDecryptable
in interfaceSecretEncryptionService
- Returns:
- true if Bamboo can decrypt given value.
-
decrypt
@NotNull public @NotNull String decrypt(@NotNull @NotNull String encryptedSecret)
Description copied from interface:SecretEncryptionService
Decrypts the supplied secret.- Specified by:
decrypt
in interfaceSecretEncryptionService
-
decryptIfDecryptable
@NotNull public @NotNull String decryptIfDecryptable(@NotNull @NotNull String encryptedSecret)
Description copied from interface:SecretEncryptionService
Decrypts secret if possible or returns original string if not.- Specified by:
decryptIfDecryptable
in interfaceSecretEncryptionService
-
encrypt
@NotNull public @NotNull String encrypt(@NotNull @NotNull String secretToEncrypt)
Description copied from interface:SecretEncryptionService
Encrypts the supplied string.- Specified by:
encrypt
in interfaceSecretEncryptionService
-
-