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

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

static Result allocate(
    SecureMemory memory, 
    ulong length
);

Documentation

Allocates a new SecureMemory struct, with the given length.

Notes

Please see the struct documentation for more information on the memory layout.

A length of 0 is valid, though not really recommended.

Params

Throws

If any of the syscalls fail, a Result will be thrown with the OS error code + message.

Returns

Result.noError on success, or an error otherwise.