java.lang.Object
org.codehaus.plexus.components.secdispatcher.internal.cipher.AESGCMNoPadding
All Implemented Interfaces:
Cipher

@Singleton @Named("AES/GCM/NoPadding") public class AESGCMNoPadding extends Object implements Cipher
  • Field Details

  • Constructor Details

    • AESGCMNoPadding

      public AESGCMNoPadding()
  • Method Details

    • encrypt

      public String encrypt(String clearText, String password) throws CipherException
      Description copied from interface: Cipher
      Encrypts the clear text data with password and returns result. No argument is allowed to be null.
      Specified by:
      encrypt in interface Cipher
      Throws:
      CipherException - if encryption failed (is unexpected to happen, as it would mean that Java Runtime lacks some Crypto elements).
    • decrypt

      public String decrypt(String encryptedText, String password) throws CipherException
      Description copied from interface: Cipher
      Decrypts the encrypted text with password and returns clear text result. No argument is allowed to be null.
      Specified by:
      decrypt in interface Cipher
      Throws:
      CipherException - if decryption failed. It may happen as with Cipher.encrypt(String, String) due Java Runtime lacking some Crypto elements (less likely). Most likely decrypt will fail due wrong provided password or maybe corrupted encrypted text.