Class SecretEncryptionServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.crypto.instance.SecretEncryptionServiceImpl
-
- All Implemented Interfaces:
SecretEncryptionService
public class SecretEncryptionServiceImpl extends Object implements SecretEncryptionService
-
-
Constructor Summary
Constructors Constructor Description SecretEncryptionServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Stringdecrypt(@NotNull String encryptedSecret)Decrypts the supplied secret.@NotNull StringdecryptIfDecryptable(@NotNull String encryptedSecret)Decrypts secret if possible or returns original string if not.@NotNull Stringencrypt(@NotNull String secretToEncrypt)Encrypts the supplied string.booleanisDecryptable(@NotNull String encryptedSecret)booleanisEncrypted(@NotNull String string)Whether the supplied string has been encrypted by this service.protected voidsetSecretEncryptionService(SecretEncryptionServiceInternal secretEncryptionService)
-
-
-
Method Detail
-
isEncrypted
public boolean isEncrypted(@NotNull @NotNull String string)Description copied from interface:SecretEncryptionServiceWhether the supplied string has been encrypted by this service.- Specified by:
isEncryptedin interfaceSecretEncryptionService
-
decrypt
@NotNull public @NotNull String decrypt(@NotNull @NotNull String encryptedSecret)
Description copied from interface:SecretEncryptionServiceDecrypts the supplied secret.- Specified by:
decryptin interfaceSecretEncryptionService
-
decryptIfDecryptable
@NotNull public @NotNull String decryptIfDecryptable(@NotNull @NotNull String encryptedSecret)
Description copied from interface:SecretEncryptionServiceDecrypts secret if possible or returns original string if not.- Specified by:
decryptIfDecryptablein interfaceSecretEncryptionService
-
isDecryptable
public boolean isDecryptable(@NotNull @NotNull String encryptedSecret)- Specified by:
isDecryptablein interfaceSecretEncryptionService- Returns:
- true if Bamboo can decrypt given value.
-
encrypt
@NotNull public @NotNull String encrypt(@NotNull @NotNull String secretToEncrypt)
Description copied from interface:SecretEncryptionServiceEncrypts the supplied string.- Specified by:
encryptin interfaceSecretEncryptionService
-
setSecretEncryptionService
protected void setSecretEncryptionService(SecretEncryptionServiceInternal secretEncryptionService)
-
-