react-native-quick-crypto
react-native-quick-crypto copied to clipboard
feat: add support for Uint8Array
This PR adds support for keys such as uint8array for the prepareSecretKey method, I noticed while trying to generate a mnemonic with the following code:
import { generateMnemonic as generateBIP39Mnemonic } from '@scure/bip39';
import { wordlist } from '@scure/bip39/wordlists/english';
That due to the checks within prepareSecretKey, keys in the format of Uint8Array were not supported and this generated the following exception:
Invalid argument type for "key". Need ArrayBuffer, KeyObject, CryptoKey, string