Crypto Lib
    Preparing search index...

    Function wipeMemory

    • Securely zeros out a Uint8Array in-place to minimize the exposure window of sensitive cryptographic material in memory.

      Parameters

      • buffer: Uint8Array

        The buffer to overwrite with zeros.

      Returns void

      import { wipeMemory } from "@sebastienrousseau/crypto-lib";

      const keyBytes = new Uint8Array([1, 2, 3, 4]);
      wipeMemory(keyBytes);
      // keyBytes is now all zeros: [0, 0, 0, 0]