Package zeroecho.core.err


package zeroecho.core.err
Exception types used by the core to signal configuration errors and unexpected provider failures.

This package defines a small, clear taxonomy of exceptions thrown when constructing or running cryptographic contexts. Use these types to distinguish programming/configuration mistakes from lower-level provider failures.

Exception categories

Usage notes

Typical usage

try {
    zeroecho.core.context.EncryptionContext ctx =
        algo.createContext(zeroecho.core.KeyUsage.ENCRYPT, key, spec);
    // use ctx...
} catch (zeroecho.core.err.UnsupportedRoleException
       | zeroecho.core.err.UnsupportedSpecException e) {
    // programming error: wrong role or incompatible key/spec
    throw new IllegalArgumentException("Bad configuration", e);
} catch (java.io.IOException e) {
    // I/O failure when initializing context
    ...
} catch (zeroecho.core.err.ProviderFailureException e) {
    // unexpected provider failure: wrap, log, or abort
    ...
}
Since:
1.0
  • Exception Classes
    Class
    Description
    Exception signaling a failure in the underlying cryptographic provider during algorithm initialization or operation.
    Exception indicating that an algorithm does not support the requested role.
    Exception indicating that a provided key/spec combination is not supported by the algorithm for the requested role.
    Exception thrown when a cryptographic signature or digest verification fails.