Message class final
A signed or encrypted PASETO message.
- Annotations
-
- @immutable
Constructors
- Message.new({required Header header, required Package package, required Payload payload})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Header
-
Standard header for all PASETO messages.
final
-
jsonContent
→ Map<
String, dynamic> ? -
The JSON if it's a JSON encoded message.
no setter
- package → Package
-
Unencrypted package that contains the content of the message.
final
- payload → Payload
-
Signed or encrypted version of the package.
final
-
props
→ List<
Object?> -
Equatable override.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringContent → String?
-
The string if it's a String encoded message.
no setter
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited - toToken → Token
-
Converts a message to a signed or encrypted Token for the wire.
no setter
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
Static Methods
-
encryptString(
String content, {required Version version, required SecretKey secretKey, }) → Future< Message> - Encrypts a message using Purpose.local.
-
signString(
String content, {required Version version, required SimpleKeyPair keyPair, }) → Future< Message> - Signs a message using Purpose.public.