WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Compat::memzero() public WP 1.0

It's actually not possible to zero memory buffers in PHP. You need the native library for that.

{} It's a method of the class: ParagonIE_Sodium_Compat{}

No Hooks.

Return

null. Nothing.

Usage

$result = ParagonIE_Sodium_Compat::memzero( $var );
$var *(string null) (required) (passed by reference — &)*

Code of ParagonIE_Sodium_Compat::memzero() WP 5.8.2

public static function memzero(&$var)
{
    /* Type checks: */
    ParagonIE_Sodium_Core_Util::declareScalarType($var, 'string', 1);

    if (self::useNewSodiumAPI()) {
        /** @psalm-suppress MixedArgument */
        sodium_memzero($var);
        return;
    }
    if (self::use_fallback('memzero')) {
        $func = '\\Sodium\\memzero';
        $func($var);
        if ($var === null) {
            return;
        }
    }
    // This is the best we can do.
    throw new SodiumException(
        'This is not implemented in sodium_compat, as it is not possible to securely wipe memory from PHP. ' .
        'To fix this error, make sure libsodium is installed and the PHP extension is enabled.'
    );
}