FortisConfigException class Errors
Thrown when the builder or caller input is misconfigured.
Typical triggers:
- Invalid key size (e.g. AES 123 bits, RSA 1024 bits).
- Unsupported padding/hash combination (e.g. label with non-OAEP-v2.1).
- Wrong IV/nonce length for the mode.
- Payload type that doesn't match the cipher's mode.
- Input of an unsupported type (e.g. passing an
inttoencrypt).
Example:
try {
Fortis.aes().keySize(123); // invalid
await Fortis.aes().keySize(123).generateKey();
} on FortisConfigException catch (e) {
print(e.message); // 'AES key size must be 128, 192, or 256 bits...'
}
See also:
- FortisException, the base type to catch every Fortis error at once.
- FortisKeyException, for key import and export failures.
- FortisEncryptionException, for encrypt and decrypt failures.
- Inheritance
-
- Object
- FortisException
- FortisConfigException
Constructors
- FortisConfigException(String message)
-
Creates a FortisConfigException with the given
message.const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited