Class Base64Encryptor

java.lang.Object
com.atlassian.crowd.crypto.Base64Encryptor
All Implemented Interfaces:
Encryptor

public class Base64Encryptor extends Object implements Encryptor
Encryptor that uses base64 to encode and decode input string. This implementation is not a safe encryption mechanism. Do not use it in production!
  • Constructor Details

    • Base64Encryptor

      public Base64Encryptor()
  • Method Details

    • encrypt

      public String encrypt(String password)
      Description copied from interface: Encryptor
      Encrypt plaintext password, and return encrypted value which can later be used in decrypt method to get plaintext password.
      Specified by:
      encrypt in interface Encryptor
      Returns:
      encrypted password.
    • decrypt

      public String decrypt(String encryptedPassword)
      Description copied from interface: Encryptor
      Decrypt encrypted password, and return its original value.

      In case of any error during decryption (such as missing decryption key) return encryptedPassword.

      Specified by:
      decrypt in interface Encryptor
      Returns:
      decrypted password or unchanged encryptedPassword in case of any error