SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
Main Page
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
_
a
b
c
e
h
i
k
l
m
n
p
q
r
s
t
u
v
Files
File List
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
include
testing
spsp
testing/spsp/random.hpp
Go to the documentation of this file.
1
10
#pragma once
11
12
#include <cstdint>
13
#include <cstdlib>
14
15
#include "
spsp/random_if.hpp
"
16
17
namespace
SPSP
18
{
23
class
Random :
public
IRandom
24
{
25
public
:
26
inline
void
bytes
(
void
* buf,
size_t
len)
const
noexcept
27
{
28
uint8_t* buf8 =
static_cast<
uint8_t*
>
(buf);
29
30
for
(
size_t
i = 0; i < len; i++) {
31
buf8[i] = rand();
32
}
33
}
34
};
35
}
// namespace SPSP
random_if.hpp
Platform-dependent random generator interface.
SPSP::Random::bytes
void bytes(void *buf, size_t len) const noexcept
Generates len truly random bytes in buf
Definition:
testing/spsp/random.hpp:26
Generated by
1.8.17