BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.
- homepage: http://cryptocoinjs.com/modules/currency/bip38/
- github: https://github.com/cryptocoinjs/bip38
- tests: https://github.com/cryptocoinjs/bip38/tree/master/test
- issues: https://github.com/cryptocoinjs/bip38/issues
- license: MIT
- versioning: http://semver-ftw.org
npm install --save bip38
Async methods are available, but using them will be slower, but free up the event loop in intervals you choose.
For benchmark results, please see the section in the README of the scryptsy library. Increasing the interval will decrease the performance hit, but increase the span between event loop free ups (UI drawing etc.) promiseInterval is the last optional parameter after scryptParams. There is no recommendation currently, as the performance trade off is app specific.
encrypt(buffer, compressed, passphrase[, progressCallback, scryptParams])
var bip38 =var wif =var myWifString = '5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR'var decoded = wifvar encryptedKey = bip38console// => '6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg'
decrypt(encryptedKey, passphrase[, progressCallback, scryptParams])
var bip38 =var wif =var encryptedKey = '6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg'var decryptedKey = bip38console// => '5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR'
- https://github.com/pointbiz/bitaddress.org/issues/56 (Safari 6.05 issue)