Skip to content
/ emip3js Public

Javascript implementation of EmIP-003 (encryption/decryption)

Notifications You must be signed in to change notification settings

Emurgo/emip3js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emip3js

emip3js is a javascript implementation of EmIP-003.

Usage

Encryption

import {encryptWithPassword, decryptWithPassword} from 'emip3js';

const passwordHex = Buffer.from('password', 'utf8').toString('hex');
const saltHex = '50515253c0c1c2c3c4c5c6c750515253c0c1c2c3c4c5c6c750515253c0c1c2c3'; // 32-byte hex string
const nonceHex = '50515253c0c1c2c3c4c5c6c7'; // 12-byte hex string
const dataHex = Buffer.from('some data to encrypt', 'utf8').toString('hex');

const ciphertextHex = await encryptWithPassword(passwordHex, saltHex, nonceHex, dataHex);

Decryption

const decryptedDataHex = await decryptWithPassword(passwordHex, ciphertextHex);

About

Javascript implementation of EmIP-003 (encryption/decryption)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •