write method

void write(
  1. OutputStreamBase output
)

Implementation

void write(OutputStreamBase output) {
  output.writeUint32(getSize()); // message + signature + public length
  // size of message
  output.writeUint32(messageBlocksSize());
  // content of message
  for (final msgBlock in messageBlocks) {
    msgBlock.write(output);
  }

  // size of signature
  output.writeUint32(signatureBlocksSize());
  // content of signature
  for (final sigBlock in signatureBlocks) {
    sigBlock.write(output);
  }

  // size of publicKey
  output.writeUint32(publicKeyBlocksSize());
  // content of publicKey
  for (final pubBlock in publicKeyBlocks) {
    pubBlock.write(output);
  }
}