toWireHeaders method

Map<String, String> toWireHeaders()

Serializes this message to wire headers map using Base64 for binary fields.

RETURNS: {"v": "$v", "w": "$w", "n": "<b64>", "c": "<b64>"}

HINT: Attach this map as HTTP headers at the call site; this library does not send HTTP.

Implementation

Map<String, String> toWireHeaders() {
  return {
    'v': v.toString(),
    'w': w.toString(),
    'n': Bytes.toBase64(nonce),
    'c': Bytes.toBase64(ciphertext),
  };
}