Skip to content

Instantly share code, notes, and snippets.

View Zeemzo's full-sized avatar
🏠
Working from home

Azeem Ashraf Zeemzo

🏠
Working from home
  • Colombo, Sri Lanka
View GitHub Profile
@Zeemzo
Zeemzo / index.js
Last active November 22, 2022 12:27
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,
@Zeemzo
Zeemzo / index.js
Last active November 22, 2022 12:19
Niftron-SDK Asymmetric Encryption
import { NiftronConfig, NIFTRON, NiftronKeypair } from "niftron-sdk";
-------------------- Niftron-SDK Configuration --------------------------
-------------------- Niftron-SDK Create Keypairs ------------------------
// Alice's End
// Message to be sent
const message = "Hello Bob!";
// create a pocket of encrypted data from Alice to Bob
const encryptedPocket = asymmetricEncryption.encrypt(
@Zeemzo
Zeemzo / index.js
Last active November 22, 2022 12:16
Niftron-SDK Create Keypairs
import { NiftronConfig, NIFTRON, NiftronKeypair } from "niftron-sdk";
-------------------- Niftron-SDK Configuration --------------------------
// create asymmetricEncryption object
const asymmetricEncryption = new NIFTRON.utils.asymmetricEncryption();
// create asymmetricEncryption object
let keypairAlice = NiftronKeypair.random();
let keypairBob = NiftronKeypair.random();
@Zeemzo
Zeemzo / index.js
Last active November 22, 2022 12:00
Niftron-SDK Configuration
import { NiftronConfig, NIFTRON } from "niftron-sdk";
// create niftron config object
const niftronConfig: NiftronConfig = {
projectKey: " - - - - - Project Key - - - - - -",
secretKey: " - - - - - Secret Key - - - - - -",
};
// initialize niftron-sdk
const niftron: NIFTRON = new NIFTRON(niftronConfig);

Keybase proof

I hereby claim:

  • I am zeemzo on github.
  • I am zeemzo (https://keybase.io/zeemzo) on keybase.
  • I have a public key ASCDMRwJRwP7IqgOPynQ4dgDCgA1EL8zsn9UAlouYWiSAgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am zeemzo on github.
  • I am zeemzo (https://keybase.io/zeemzo) on keybase.
  • I have a public key ASCDMRwJRwP7IqgOPynQ4dgDCgA1EL8zsn9UAlouYWiSAgo

To claim this, I am signing this object:

@Zeemzo
Zeemzo / Keybase.md
Created September 10, 2019 06:31
Keybase proof

Keybase proof

I hereby claim:

  • I am zeemzo on github.
  • I am zeemzo (https://keybase.io/zeemzo) on keybase.
  • I have a public key ASCDMRwJRwP7IqgOPynQ4dgDCgA1EL8zsn9UAlouYWiSAgo

To claim this, I am signing this object: