1234567891011121314151617181920212223242526module juptune.crypto.memory;
struct Slice(
T
)
{
/++ FUNCTIONS ++/
///
T[] memory();
///
bool mustBeContiguous( other);
///
bool mustNotOverlap( other);
///
opSlice(size_t _)(size_t start, size_t end);
///
reinterpret(NewT)();
///
const reinterpret(NewT)();
/++ VARIABLES ++/
///
T[] _memory;
}
A loose wrapper around a T[]that originates from a SecureMemorystruct.
Use this type when you want random length slices, but only from hardened memory.
A rarity for Juptune - this struct is copyable as there just isn't really a clean way to enforce that it's not copied outside of the SecureMemorystruct's lifetime without it getting in the way.
In case it's not clear. $(B This slice must not outlive the SecureMemorystruct it came from).
The slice can never be accessed when its unerlying slice is null.
If you're slicing up a bunch of memory, please use mustNotOverlapand mustBeContiguousto help ensure you've sliced things correctly.
| Name | Description |
|---|---|
| memory | |
| mustBeContiguous | |
| mustNotOverlap | |
| opSlice | |
| reinterpret | |
| reinterpret |
| Name | Description |
|---|---|
| _memory |