SecureMessage class
Properties
- ciphertext → Uint8List
-
Ciphertext (
ciphertext
) as raw bytes.final - hashCode → int
-
The hash code for this object.
no setterinherited
- nonce → Uint8List
-
Nonce (
nonce
) as raw 8 bytes.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tag → Uint8List
-
Tag (body) as raw 32 bytes (HMAC-SHA256).
final
- version → int
-
Protocol version (
version
). Currently 1.final - window → int
-
Time window (
window
): floor(epoch / windowSeconds).final
Methods
-
copyWith(
{int? version, int? window, Uint8List? nonce, Uint8List? ciphertext, Uint8List? tag}) → SecureMessage - Convenience: clones this message with new ciphertext/tag (e.g., for re-encrypt).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
toWireBody(
) → String - Serializes this message to wire body string (Base64 tag).
-
toWireHeaders(
) → Map< String, String> - Serializes this message to wire headers map using Base64 for binary fields.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromParts(
{required int version, required int window, required Uint8List nonce, required Uint8List ciphertext, required Uint8List tag}) → SecureMessage -
Builds a
SecureMessage
from raw components. -
fromWire(
{required Map< String, String> headers, required String body}) → SecureMessage -
Parses a
SecureMessage
from wire headers/body.