JSON API to collect extra entropy

This commit is contained in:
Gioacchino Mazzurco 2018-11-22 21:56:55 +01:00
parent abec811d31
commit 81d23fa607
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051
2 changed files with 11 additions and 0 deletions

View File

@ -288,6 +288,14 @@ struct RsLoginHelper
RsInit::LoadCertificateStatus attemptLogin(
const RsPeerId& account, const std::string& password );
/**
* @brief Feed extra entropy to the crypto libraries
* @jsonapi{development,unauthenticated}
* @param[in] bytes number to feed to the entropy pool
* @return false if error occurred, true otherwise
*/
static bool collectEntropy(uint32_t bytes);
struct Location : RsSerializable
{
RsPeerId mLocationId;

View File

@ -1934,6 +1934,9 @@ RsInit::LoadCertificateStatus RsLoginHelper::attemptLogin(
return RsInit::ERR_UNKOWN;
}
/*static*/ bool RsLoginHelper::collectEntropy(uint32_t bytes)
{ return RsInit::collectEntropy(bytes); }
void RsLoginHelper::getLocations(std::vector<RsLoginHelper::Location>& store)
{
std::list<RsPeerId> locIds;