Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
dh.hpp
Go to the documentation of this file.
1#pragma once
3#include <vector>
4#include <stdint.h>
5
6namespace fc {
7
9 diffie_hellman():valid(0),g(5){}
10 bool generate_params( int s, uint8_t g );
11 bool generate_pub_key();
12 bool compute_shared_key( const char* buf, uint32_t s );
13 bool compute_shared_key( const std::vector<char>& pubk);
14 bool validate();
15
16 std::vector<char> p;
17 std::vector<char> pub_key;
18 std::vector<char> priv_key;
19 std::vector<char> shared_key;
20 bool valid;
22 };
23
24} // namespace fc
25
26
namespace sysio::chain
Definition authority.cpp:3
unsigned int uint32_t
Definition stdint.h:126
unsigned char uint8_t
Definition stdint.h:124
std::vector< char > priv_key
Definition dh.hpp:18
bool compute_shared_key(const char *buf, uint32_t s)
Definition dh.cpp:64
bool validate()
Definition dh.cpp:26
std::vector< char > p
Definition dh.hpp:16
uint8_t g
Definition dh.hpp:21
std::vector< char > shared_key
Definition dh.hpp:19
bool generate_params(int s, uint8_t g)
Definition dh.cpp:13
std::vector< char > pub_key
Definition dh.hpp:17
bool generate_pub_key()
Definition dh.cpp:37
char * s
uint8_t buf[2048]