
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@metamask/toprf-secure-backup
Advanced tools
@metamask/toprf-secure-backupyarn add @metamask/toprf-secure-backup
or
npm install @metamask/toprf-secure-backup
This package is part of a monorepo. Instructions for contributing can be found in the monorepo README.
This SDK handles sensitive cryptographic material including passwords, seeds, authentication tokens, and private keys.
Important: JavaScript's garbage collector provides no guarantees about when sensitive data is removed from memory. While the SDK performs best-effort cleanup internally, complete memory clearing cannot be guaranteed.
null and call array.fill(0) when done// âś… Good: Use immediately and clear
async function decrypt(data) {
const { encKey } = await toprfBackup.recoverEncKey(params);
try {
return await processData(data, encKey);
} finally {
encKey.fill(0);
}
}
// ❌ Bad: Long-lived storage
this.encKey = result.encKey; // Persists in memory
The SDK internally clears sensitive Uint8Array data (session keys, password bytes, seeds) where possible, but JavaScript strings and BigInts cannot be reliably cleared from memory.
FAQs
The MetaMask Node module template
The npm package @metamask/toprf-secure-backup receives a total of 61,590 weekly downloads. As such, @metamask/toprf-secure-backup popularity was classified as popular.
We found that @metamask/toprf-secure-backup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.