
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@notabene/crypto
Advanced tools
Documentation: https://notabene-id.github.io/notabene-crypto/
Encryption Library for Notabene Services
yarn
yarn add @notabene/crypto
npm
npm install @notabene/crypto
const {
createEncriptionKeyPair,
serializeKey,
deserializeKey,
encrypt,
decrypt,
} = require("@notabene/crypto");
//Create pair of keys
const alice = createEncriptionKeyPair();
console.log(serializeKey(alice));
/*
{
publicKeyB64: '...',
secretKeyB64: '...'
}
*/
//Get bob key
const bobSerializedKeys = {
publicKeyB64: "vBTvb1MGLOahUPgzAJJB/fPqi6GOG4kcaaNAqD3SDzU=",
secretKeyB64: "iKVZwIFyONUNga0dKlZqD1mlVRBVUmVnsiFICkTY9Vk=",
};
console.log(bobSerializedKeys);
const bob = deserializeKey(bobSerializedKeys);
//Encrypt a message from alice to bob
encrypt(alice, bob.publicKey, "sensitive data").then(enc => {
console.log(enc);
/*
{
ciphertext: '...',
nonce: '...',
fromPublicKey: '...',
toPublicKey: 'vBTvb1MGLOahUPgzAJJB/fPqi6GOG4kcaaNAqD3SDzU=',
version: 'x25519-xsalsa20-poly1305'
}
*/
//Decrypt message with bob secretKey
const message = decrypt(bob.secretKey, enc);
console.log(message);
/*
"sensitive data"
*/
});
Instal dependencies
$ npm install
Build
$ npm run build
Test
$ npm test
To publish to NPM:
$ pika publish
To publish dosc:
$ npm run docs
Contributions are welcome!
Want to file a bug, request a feature or contribute some code?
MIT © Notabene
FAQs
Encryption Library for Notabene Services
We found that @notabene/crypto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.