secureWipe()
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / secureWipe
Function: secureWipe()
Section titled “Function: secureWipe()”secureWipe(
buffer):void
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:3464
Securely wipe a buffer containing sensitive data
This performs a defense-in-depth wipe:
- Overwrite with random data (defeats simple memory scrapers)
- Zero the buffer (standard cleanup)
Note: Due to JavaScript’s garbage collection and potential JIT optimizations, this cannot guarantee complete erasure. However, it provides significant improvement over leaving secrets in memory.
Parameters
Section titled “Parameters”buffer
Section titled “buffer”Uint8Array
The buffer to wipe (modified in place)
Returns
Section titled “Returns”void
Example
Section titled “Example”const secretKey = randomBytes(32)// ... use the key ...secureWipe(secretKey) // Clean up when done