mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
31 lines
1010 B
C++
31 lines
1010 B
C++
#include "ServerConfig.h"
|
|
#include "Crypto/mnemonic_german.h"
|
|
#include "Crypto/mnemonic_bip0039.h"
|
|
|
|
namespace ServerConfig {
|
|
Mnemonic g_Mnemonic_WordLists[MNEMONIC_MAX];
|
|
|
|
void loadMnemonicWordLists()
|
|
{
|
|
for (int i = 0; i < MNEMONIC_MAX; i++) {
|
|
int iResult = 0;
|
|
switch (i) {
|
|
case MNEMONIC_GRADIDO_BOOK_GERMAN_RANDOM_ORDER:
|
|
iResult = g_Mnemonic_WordLists[i].init(populate_mnemonic_german, g_mnemonic_german_original_size, g_mnemonic_german_compressed_size);
|
|
if (iResult) {
|
|
printf("[%s] error init german mnemonic set, error nr: %d\n", __FUNCTION__, iResult);
|
|
//return -1;
|
|
}
|
|
break;
|
|
case MNEMONIC_BIP0039_SORTED_ORDER:
|
|
iResult = g_Mnemonic_WordLists[i].init(populate_mnemonic_bip0039, g_mnemonic_bip0039_original_size, g_mnemonic_bip0039_compressed_size);
|
|
if (iResult) {
|
|
printf("[%s] error init bip0039 mnemonic set, error nr: %d\n", __FUNCTION__, iResult);
|
|
|
|
}
|
|
break;
|
|
default: printf("[%s] unknown MnemonicType\n", __FUNCTION__);
|
|
}
|
|
}
|
|
}
|
|
} |