Enum JenkinsSecretPasswordEncrypter

java.lang.Object
java.lang.Enum<JenkinsSecretPasswordEncrypter>
io.jenkins.plugins.railflow.jenkins.util.JenkinsSecretPasswordEncrypter
All Implemented Interfaces:
PasswordEncrypter, Serializable, Comparable<JenkinsSecretPasswordEncrypter>

public enum JenkinsSecretPasswordEncrypter extends Enum<JenkinsSecretPasswordEncrypter> implements PasswordEncrypter
Default implementation which uses Jenkins Secret;
Author:
Sergey Oplavin
  • Enum Constant Details

  • Method Details

    • values

      public static JenkinsSecretPasswordEncrypter[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static JenkinsSecretPasswordEncrypter valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • encrypt

      public Secret encrypt(String plainTextPassword)
      Description copied from interface: PasswordEncrypter
      Encrypt the plain text password.
      Specified by:
      encrypt in interface PasswordEncrypter
      Parameters:
      plainTextPassword - the plain text password
      Returns:
      the encrypted value
    • decrypt

      public String decrypt(Secret encryptedPassword)
      Description copied from interface: PasswordEncrypter
      Decrypt the encrypted password
      Specified by:
      decrypt in interface PasswordEncrypter
      Parameters:
      encryptedPassword - the encrypted password
      Returns:
      the plain text