BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Variables
a
c
d
e
g
h
l
n
o
t
w
Typedefs
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
a
b
c
d
e
f
g
h
m
n
o
p
s
t
u
v
w
y
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
Functions
Variables
Typedefs
Macros
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
libraries
fc
src
crypto
rand.cpp
Go to the documentation of this file.
1
#include <openssl/rand.h>
2
#include <
fc/crypto/openssl.hpp
>
3
#include <
fc/exception/exception.hpp
>
4
#include <
fc/fwd_impl.hpp
>
5
6
7
namespace
fc
{
8
9
void
rand_bytes
(
char
* buf,
int
count)
10
{
11
static
int
init =
init_openssl
();
12
(void)init;
13
14
int
result = RAND_bytes((
unsigned
char
*)buf, count);
15
if
(result != 1)
16
FC_THROW
(
"Error calling OpenSSL's RAND_bytes(): ${code}"
, (
"code"
, (uint32_t)ERR_get_error()));
17
}
18
19
}
// namespace fc
openssl.hpp
fc
Definition:
api.hpp:15
FC_THROW
#define FC_THROW( ...)
Definition:
exception.hpp:366
exception.hpp
Defines exception's used by fc.
fc::rand_bytes
void rand_bytes(char *buf, int count)
Definition:
rand.cpp:9
fc::init_openssl
int init_openssl()
Definition:
openssl.cpp:63
fwd_impl.hpp
Generated on Fri Dec 15 2023 06:12:43 for BitShares-Core by
1.8.17