Skip to content

Keystore Errors

Keystore.InvalidKeySizeError

Thrown when a key contains fewer than 32 bytes.

Examples

import { Keystore } from 'ox'
 
const [, opts] = Keystore.pbkdf2({
  password: 'testpassword'
})
 
Keystore.encrypt('0x01', '0x0123456789abcdef', opts)
Keystore.InvalidKeySizeError: Key must contain at least 32 bytes. Received 8 bytes.

Source: src/core/Keystore.ts