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 (var msgBlock in messageBlocks) {
    msgBlock.write(output);
  }

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

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