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 int to encrypt).

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:

Inheritance

Constructors

FortisConfigException(String message)
Creates a FortisConfigException with the given message.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
A human-readable description of what went wrong.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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