Function ensure [src]

Use this function to increase our_end. This should always be called with an amount provided by us, not them.

Prototype

pub fn ensure(d: *Decoder, amt: usize) !void

Parameters

d: *Decoderamt: usize

Source

pub fn ensure(d: *Decoder, amt: usize) !void { d.our_end = @max(d.idx + amt, d.our_end); if (d.our_end > d.their_end) return error.TlsDecodeError; }