Class MalformedCiphertextException

All Implemented Interfaces:
Serializable

public class MalformedCiphertextException extends GeneralSecurityException
Thrown by AesGcmCipher.decrypt(String) when the input is not valid Base64 or is too short to contain an IV — i.e. not something this cipher produced. It extends GeneralSecurityException so it fits the Cipher contract's checked-exception surface, and Gdpr.unprotect(java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, java.lang.Object>, com.babelqueue.gdpr.Cipher) surfaces it (like any decrypt failure) as a DecryptException.
See Also:
  • Constructor Details

    • MalformedCiphertextException

      public MalformedCiphertextException(String reason, Throwable cause)
      Parameters:
      reason - why the ciphertext is malformed
      cause - the underlying cause, or null