WvStreams
wvoakley.h
00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  * Copyright (C) 2003 Net Integration Technologies, Inc.
00004  *
00005  * Diffie-Hellman shared secret creation.
00006  */
00007 
00008 #ifndef __WVOAKLEY_H
00009 #define __WVOAKLEY_H
00010 
00011 #include "wvstream.h"
00012 #include "wvdiffiehellman.h"
00013 
00014 class WvOakleyAuth
00015 {
00016 public:
00017     WvOakleyAuth(int group);
00018     short public_len();
00019     short other_pub_len();
00020     short get_public_key(WvBuf &outbuf, short len);
00021     short get_other_public_key(WvBuf &outbuf, short len);
00022     void create_secret(WvBuf &_other_pub_key, short len);
00023     WvDynBuf dh_secret;
00024 
00025 private:
00026     WvDiffieHellman *dh;
00027     short pub_len, other_len;
00028     short secret_len;
00029     WvDynBuf other_pub_key;
00030 };
00031 
00032 #endif /* __WVOAKLEY_H */