toJson method

Map<String, dynamic> toJson()

Serializes to JSON-compatible map for storage.

Implementation

Map<String, dynamic> toJson() => {
      'ciphertext': base64Encode(ciphertext),
      'iv': base64Encode(iv),
      'salt': base64Encode(salt),
      'encryptedAt': encryptedAt.toIso8601String(),
      'expiresAt': expiresAt?.toIso8601String(),
      'modeHint': modeHint,
    };