SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
All Classes Files Functions Variables Typedefs Enumerations
random_if.hpp
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <cstdlib>
13 
14 #include "spsp/exception.hpp"
15 
16 namespace SPSP
17 {
23  {
25  };
26 
31  class IRandom
32  {
33  public:
44  virtual void bytes(void* buf, size_t len) const = 0;
45  };
46 } // namespace SPSP
SPSP::IRandom::bytes
virtual void bytes(void *buf, size_t len) const =0
Generates len truly random bytes in buf
SPSP::Exception::Exception
Exception(const std::string &msg)
Constructs a new exception.
Definition: exception.hpp:31
exception.hpp
Base of all SPSP exceptions.
SPSP::RandomGeneratorError
Random generator error.
Definition: random_if.hpp:22
SPSP::IRandom
Random generator interface.
Definition: random_if.hpp:31
SPSP::Exception
Base SPSP exception.
Definition: exception.hpp:21