web3dart
web3dart copied to clipboard
Wallet.fromJson Function execution is too slow
String content = new File("keystore/UTC--2019-10-19T10-22-27.882172000Z--4ec06cf1958aec265808bd9f3383c3dee418b543").readAsStringSync();
Wallet wallet = Wallet.fromJson(content, "123456");
I don't know why this function needs to be executed for a few minutes? Is my method wrong?
Yeah, the underlying cryptography library is rather slow (it's purely written in Dart). The strength of a wallet is configurable in the wallwt file itself. Can you post the kdf entry from the json and the kdfparams (you can skip the salt).
Now that dart:ffi is a thing, we might be able to speed things up by using a native library to do the heavy lifting, but I haven't looked into that yet for this project.