/* { generateKeys start } */ int generateKeys(prng_state* prng){ ecc_key key; int err; if ((err = ecc_make_key(prng,find_prng("fortuna"),24,&key))!= CRYPT_OK) { printf("Error setting up , %s\n", error_to_string(err)); exit(EXIT_FAILURE); } saveKeyToFile(&key, "private.key", PK_PRIVATE); saveKeyToFile(&key, "public.key", PK_PUBLIC); return 0; }
void ClientIdInterface::setKeyForClient(const QString &clientId, const QString &clientKey) { m_keys.insert(clientId, clientKey); saveKeyToFile(clientId, clientKey); }