Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
rand.cpp
Go to the documentation of this file.
1#include <openssl/rand.h>
4#include <fc/fwd_impl.hpp>
5
6
7namespace fc {
8
9void rand_bytes(char* buf, int count)
10{
11 int result = RAND_bytes((unsigned char*)buf, count);
12 if (result != 1)
13 FC_THROW("Error calling OpenSSL's RAND_bytes(): ${code}", ("code", (uint32_t)ERR_get_error()));
14}
15
16void rand_pseudo_bytes(char* buf, int count)
17{
19}
20
21} // namespace fc
Defines exception's used by fc.
#define FC_THROW( ...)
int * count
namespace sysio::chain
Definition authority.cpp:3
void rand_bytes(char *buf, int count)
Definition rand.cpp:9
void rand_pseudo_bytes(char *buf, int count)
Definition rand.cpp:16
unsigned int uint32_t
Definition stdint.h:126
uint8_t buf[2048]