Last active
November 22, 2022 12:27
-
-
Save Zeemzo/97fb90bfbed1efd4002775a6bfc0581c to your computer and use it in GitHub Desktop.
Niftron-SDK Asymmetric Decryption
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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