Skip to content

SmartCash/bip38

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bip38-smart

Version

A JavaScript component that adheres to the BIP38 standard to secure your crypto currency private keys. Fully compliant with Node.js and the browser (via Browserify).

Why?

BIP38 is a standard process to encrypt Bitcoin, SmartCash and crypto currency private keys that is imprevious to brute force attacks thus protecting the user.

Package Info

Usage

Installation

npm install --save bip38-smart

API

encrypt(buffer, compressed, passphrase[, progressCallback, scryptParams])

var bip38 = require('bip38-smart')
var wif = require('wif-smart')

var myWifString = 'VNUeptnSW5iY8F8Drn46uKXkrSmet8a7wSTzvWRHhjjbWAaTY5AW'
var decoded = wif.decode(myWifString)

var encryptedKey = bip38.encrypt(decoded.privateKey, decoded.compressed, 'TestingOneTwoThree')
console.log(encryptedKey)
// => '6PYNiZZBhoCLVv67xCWXDzMVfqspgZxX3X6EXMpFpcmiqs4yH7Bw8nKuaT'aT'

decrypt(encryptedKey, passhprase[, progressCallback, scryptParams])

var bip38 = require('bip38-smart')
var wif = require('wif-smart')

var encryptedKey = '6PYNiZZBhoCLVv67xCWXDzMVfqspgZxX3X6EXMpFpcmiqs4yH7Bw8nKuaT'
var decryptedKey = bip38.decrypt(encryptedKey, 'TestingOneTwoThree', function (status) {
  console.log(status.percent) // will print the precent every time current increases by 1000
})

console.log(wif.encode(0xBF, decryptedKey.privateKey, decryptedKey.compressed))
// => 'VNUeptnSW5iY8F8Drn46uKXkrSmet8a7wSTzvWRHhjjbWAaTY5AW'

References

About

BIP38 is a standard process to encrypt crypto currency private keys that is less susceptible to brute force attacks thus protecting the user.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%