sodium_mprotect_noaccess

The sodium_mprotect_noaccess() function makes a region allocated using sodium_malloc() or sodium_allocarray() inaccessible. It cannot be read or written, but the data are preserved. This function can be used to make confidential data inaccessible except when actually needed for a specific operation.

extern (C)
int
sodium_mprotect_noaccess
(
void* ptr
)

Meta