Class ProviderFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
zeroecho.core.err.ProviderFailureException
- All Implemented Interfaces:
Serializable
Exception signaling a failure in the underlying cryptographic provider during
algorithm initialization or operation.
This runtime exception is used to wrap provider or JCA/JCE errors that occur
while creating or initializing cipher contexts (for example, inside AES-GCM
or ChaCha20-Poly1305 attach(...) flows). Typical root causes include
unavailable transformations, invalid provider state, or rejected parameters
that surface as GeneralSecurityException and are rethrown as
ProviderFailureException.
Usage and semantics
- Thrown from context setup or transformation wiring when
Cipher.getInstance(...)orinit(...)fails in the provider. - Represents provider-layer failure, distinct from unsupported role/spec
conditions (see
UnsupportedRoleExceptionandUnsupportedSpecException). - May be translated to
IOExceptionat API boundaries that declare I/O only, while preserving the original cause viaThrowable.getCause().
Example
try {
Cipher c = Cipher.getInstance(jceName()); // provider resolution
initCipher(c, nonce); // provider init
return new Stream(upstream, c, jceName()); // streaming transform
} catch (GeneralSecurityException e) {
throw new ProviderFailureException(jceName() + " attach/init failed", e);
}
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new exception wrapping a provider failure. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ProviderFailureException
-