Skip to content

Instantly share code, notes, and snippets.

@Zeemzo
Last active November 22, 2022 12:27
Show Gist options
  • Save Zeemzo/97fb90bfbed1efd4002775a6bfc0581c to your computer and use it in GitHub Desktop.
Save Zeemzo/97fb90bfbed1efd4002775a6bfc0581c to your computer and use it in GitHub Desktop.
Niftron-SDK Asymmetric Decryption
import { NiftronConfig, NIFTRON, NiftronKeypair } from "niftron-sdk";
-------------------- Niftron-SDK Configuration --------------------------
-------------------- Niftron-SDK Create Keypairs ------------------------
-------------------- Niftron-SDK Asymmetric Encryption ------------------
// Bob's End
// decrypt
const decryptedData = asymmetricEncryption.decrypt(
encryptedPocket,
keypairBob.secret()
);
console.log(decryptedData); // -> Hello Bob!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment