Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions SecureMemory.contigiousSlice

1
2
3
4
5
6
7
8
module juptune.crypto.memory;

void contigiousSlice(
    T
)(
    size_t[] lengths, 
    *[] slices
);

Documentation

Slices the memory into the specified slices, ensuring that the slices do not overlap.

Assertions

lengthsand slicesmust be the same length.

The lengths must all be an exact multiple of T.sizeof.

The slices must all be non-null.

The total length of the slices cannot exceed the length of the memory.

Additionally there is an internal numeric overflow check.

Notes

lengths[0]matches with slices[0], lengths[1]with slices[1], etc...

Params