Class AbstractJceCrypt

java.lang.Object
org.apache.wicket.core.util.crypt.AbstractJceCrypt
All Implemented Interfaces:
ICrypt
Direct Known Subclasses:
AESCrypt

public abstract class AbstractJceCrypt extends Object implements ICrypt
Base class for JCE based ICrypt implementations.
  • Constructor Details

  • Method Details

    • decryptUrlSafe

      public final String decryptUrlSafe(String text)
      Decrypts a string into a string.
      Specified by:
      decryptUrlSafe in interface ICrypt
      Parameters:
      text - text to decrypt
      Returns:
      the decrypted text
    • encryptUrlSafe

      public final String encryptUrlSafe(String plainText)
      Encrypt a string into a string using URL safe Base64 encoding.
      Specified by:
      encryptUrlSafe in interface ICrypt
      Parameters:
      plainText - text to encrypt
      Returns:
      encrypted string
    • decrypt

      protected abstract byte[] decrypt(byte[] encrypted)
      Decrypts an encrypted byte array.
      Parameters:
      encrypted - byte array to decrypt
      Returns:
      the decrypted text
    • encrypt

      protected abstract byte[] encrypt(byte[] plainBytes)
      Encrypts the given text into a byte array.
      Parameters:
      plainBytes - text to encrypt
      Returns:
      the string encrypted