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.opSlice

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

 opSlice(
    ulong _ = 0
)(
    size_t start, 
    size_t end
);

Documentation

Creates a SecureMemory.Slicefrom the specified memory range.

Generally you should use accesswhen possible to help prevent use-after-free bugs, but there are normal cases where code needs to access only parts of the secure memory without caring about the struct in its entirety.

So to allow code to statically specify that they want a slice of SecureMemory, this overload is provided.

This is not marked @safe or @trusted since there is no way to prevent the returned slice from outliving the SecureMemorystruct, so the user code itself can only be @trusted at best.

ON THIS PAGE