ChachaPolyPacketWriter.protect

ubyte[] protect(const(ubyte)[] payload)

Encrypts and authenticates one payload.

Parameters

payloadMessage bytes including the message-number byte.

Returns

The complete wire packet: encrypted length, ciphertext, tag.

Throws

SshChaChaException on padding impossibilities or

sequence exhaustion.