secureZero

fnvoid secureZero(ubyte[] data) nothrow @nogc @trusted

Securely zeros a byte array, preventing the compiler from optimizing away the operation.

This should be used to wipe secret key material from memory when it is no longer needed. The function uses volatile writes to ensure the zeroing is not eliminated by the optimizer.

Parameters

dataThe byte array to zero.