Add mention of Async

This commit is contained in:
junderw 2020-04-09 12:43:18 +09:00
parent 70ce332efe
commit d2c134feac
No known key found for this signature in database
GPG Key ID: B256185D3A971908

View File

@ -29,6 +29,12 @@ BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys
npm install --save bip38
### Async methods
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](https://github.com/cryptocoinjs/scryptsy/tree/395c3b09b21e06ea4a6cc2933e046c0984a414c5#benchmarks) 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.
### API
### encrypt(buffer, compressed, passphrase[, progressCallback, scryptParams])
@ -67,4 +73,3 @@ console.log(wif.encode(0x80, decryptedKey.privateKey, decryptedKey.compressed))
- https://github.com/casascius/Bitcoin-Address-Utility/tree/master/Model
- https://github.com/nomorecoin/python-bip38-testing/blob/master/bip38.py
- https://github.com/pointbiz/bitaddress.org/blob/master/src/ninja.key.js