#include <QFile>
#include <QStringList>
#include <QtDebug>
#include "crypto.h"
Go to the source code of this file.
Functions | |
QByteArray | crypto_rand_bytes (int len) |
quint32 | crypto_rand_quint32 (quint32 max) |
QString | crypto_rand_string (int len) |
Definition in file crypto.cpp.
QByteArray crypto_rand_bytes | ( | int | len | ) |
Returns len bytes of pseudorandom data on success, or an empty QByteArray on failure. This function is based on crypto_seed_rng() from Tor's crypto.c. See LICENSE for details on Tor's license.
Definition at line 79 of file crypto.cpp.
Referenced by crypto_rand_quint32().
quint32 crypto_rand_quint32 | ( | quint32 | max | ) |
Returns a pseudorandom integer, chosen uniformly from the the values in the range [0, max). This function is based on crypto_rand_int() from Tor's crypto.c. See LICENSE for details on Tor's license.
Definition at line 136 of file crypto.cpp.
Referenced by crypto_rand_string().
QString crypto_rand_string | ( | int | len | ) |
Generates a pseudorandom string of length len containing printable ASCII characters of length from the range '!' (0x21) to '~' (0x7e).
Definition at line 158 of file crypto.cpp.
Referenced by TorSettings::generateRandomPassword().