public class CryptoException

  1. Object
  2. Throwable
  3. Exception
  4. RuntimeException
  5. CryptoException
Thrown by classes in this package when a cryptographic operation fails. This is a runtime exception so callers are not forced to handle every operation, but it can be caught explicitly when needed (e.g. a malformed key, an authentication-tag mismatch, an algorithm that is not available on the current platform, etc.).

Constructors

public CryptoException(String message)Creates a new instance with the given message.
public CryptoException(String message, Throwable cause)Creates a new instance wrapping an underlying cause.

Inherited methods

Constructor details

CryptoException

public CryptoException(String message)
Creates a new instance with the given message.

Parameters

message String
human readable description of the failure

CryptoException

public CryptoException(String message, Throwable cause)
Creates a new instance wrapping an underlying cause.

Parameters

message String
human readable description of the failure
cause Throwable
underlying exception that triggered the failure