ethers.js/docs/v5/concepts/security
2021-02-08 15:26:10 -05:00
..
index.html docs: commit built docs 2021-02-08 15:26:10 -05:00
README.md Updated docs build. 2020-07-03 01:54:56 -04:00

Documentation: html

Security

Key Derivation Functions

Why does it take so long?

Mitigating the User Experience

// Our wallet object
const wallet = Wallet.createRandom();

// The password to encrypt with
const password = "password123";

// WARNING: Doing this substantially reduces the security
//          of the wallet. This is highly NOT recommended.

// We override the default scrypt.N value, which is used
// to indicate the difficulty to crack this wallet.
const json = wallet.encrypt(password, {
  scrypt: {
    // The number must be a power of 2 (default: 131072)
    N: 64
  }
});