WvStreams
include
wvdiffiehellman.h
1
/* -*- Mode: C++ -*-
2
* Worldvisions Weaver Software:
3
* Copyright (C) 2003 Net Integration Technologies, Inc.
4
*
5
* Diffie-Hellman shared secret creation.
6
*/
7
8
#ifndef __WVDIFFIEHELLMAN_H
9
#define __WVDIFFIEHELLMAN_H
10
11
#include <openssl/dh.h>
12
13
#include "wvstream.h"
14
#include "wvlog.h"
15
16
class
WvDiffieHellman
17
{
18
public
:
19
WvDiffieHellman
(
const
unsigned
char
*_key,
int
_keylen,
20
BN_ULONG _generator);
21
~
WvDiffieHellman
() { DH_free(info); }
22
23
void
get_created_secret(
WvBuf
&outbuf,
size_t
len);
24
int
get_public_value(
WvBuf
&outbuf,
int
len);
25
26
int
pub_key_len();
27
bool
create_secret(
WvBuf
&inbuf,
size_t
in_len,
WvBuf
& outbuf);
28
29
protected
:
30
DH *info;
31
BN_ULONG generator;
32
33
private
:
34
35
WvLog
log;
36
};
37
38
#endif
/* __WVDIFFIEHELLMAN_H */
WvLog
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's.
Definition:
wvlog.h:56
WvBufBase< unsigned char >
Specialization of WvBufBase for unsigned char type buffers intended for use with raw memory buffers.
Definition:
wvbuf.h:22
WvDiffieHellman
Definition:
wvdiffiehellman.h:16
Generated by
1.8.17