mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
add function to retrieve mnemonic wordlist
This commit is contained in:
parent
b5ceb14f8d
commit
10c42633fc
5
bip39.c
5
bip39.c
@ -73,3 +73,8 @@ void mnemonic_to_seed(const char *mnemonic, const char *passphrase, uint8_t seed
|
|||||||
saltlen += 8;
|
saltlen += 8;
|
||||||
pbkdf2((const uint8_t *)mnemonic, strlen(mnemonic), salt, saltlen, PBKDF2_ROUNDS, seed, 512 / 8);
|
pbkdf2((const uint8_t *)mnemonic, strlen(mnemonic), salt, saltlen, PBKDF2_ROUNDS, seed, 512 / 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char **mnemonic_wordlist(void)
|
||||||
|
{
|
||||||
|
return wordlist;
|
||||||
|
}
|
||||||
|
2
bip39.h
2
bip39.h
@ -9,4 +9,6 @@ const char *mnemonic_from_data(const uint8_t *data, int len);
|
|||||||
|
|
||||||
void mnemonic_to_seed(const char *mnemonic, const char *passphrase, uint8_t seed[512 / 8]);
|
void mnemonic_to_seed(const char *mnemonic, const char *passphrase, uint8_t seed[512 / 8]);
|
||||||
|
|
||||||
|
const char **mnemonic_wordlist(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user