OpenDDS::Security::SSL::DHAlgorithm Class Reference

#include <DiffieHellman.h>

Inheritance diagram for OpenDDS::Security::SSL::DHAlgorithm:
Inheritance graph
[legend]

List of all members.

Public Types

typedef DCPS::unique_ptr
< DHAlgorithm
unique_ptr

Public Member Functions

 DHAlgorithm ()
virtual ~DHAlgorithm ()
virtual int init ()=0
virtual int pub_key (DDS::OctetSeq &dst)=0
virtual int gen_shared_secret (const DDS::OctetSeq &pub_key)
virtual const DDS::OctetSeqget_shared_secret () const
virtual bool cmp_shared_secret (const DHAlgorithm &other) const
virtual const char * kagree_algo () const =0

Protected Member Functions

virtual int compute_shared_secret (const DDS::OctetSeq &pub_key)=0
int hash_shared_secret ()

Protected Attributes

EVP_PKEYk_
DDS::OctetSeq shared_secret_

Detailed Description

Definition at line 18 of file DiffieHellman.h.


Member Typedef Documentation

Definition at line 21 of file DiffieHellman.h.


Constructor & Destructor Documentation

OpenDDS::Security::SSL::DHAlgorithm::DHAlgorithm (  )  [inline]

Definition at line 23 of file DiffieHellman.h.

00023 : k_(NULL) {}

OpenDDS::Security::SSL::DHAlgorithm::~DHAlgorithm (  )  [virtual]

Definition at line 35 of file DiffieHellman.cpp.

References k_.

00035 { EVP_PKEY_free(k_); }


Member Function Documentation

bool OpenDDS::Security::SSL::DHAlgorithm::cmp_shared_secret ( const DHAlgorithm other  )  const [virtual]

Definition at line 37 of file DiffieHellman.cpp.

References get_shared_secret(), and shared_secret_.

00038   {
00039     if (shared_secret_.length() != other.get_shared_secret().length()) {
00040       return false;
00041     }
00042     return (0 == std::memcmp(shared_secret_.get_buffer(),
00043                              other.get_shared_secret().get_buffer(),
00044                              shared_secret_.length()));
00045   }

Here is the call graph for this function:

virtual int OpenDDS::Security::SSL::DHAlgorithm::compute_shared_secret ( const DDS::OctetSeq pub_key  )  [protected, pure virtual]
virtual int OpenDDS::Security::SSL::DHAlgorithm::gen_shared_secret ( const DDS::OctetSeq pub_key  )  [inline, virtual]

Definition at line 29 of file DiffieHellman.h.

00030     {
00031       int err = compute_shared_secret(pub_key) || hash_shared_secret();
00032       return err;
00033     }

virtual const DDS::OctetSeq& OpenDDS::Security::SSL::DHAlgorithm::get_shared_secret (  )  const [inline, virtual]

Definition at line 34 of file DiffieHellman.h.

Referenced by cmp_shared_secret().

00035     {
00036       return shared_secret_;
00037     }

Here is the caller graph for this function:

int OpenDDS::Security::SSL::DHAlgorithm::hash_shared_secret (  )  [protected]

Definition at line 47 of file DiffieHellman.cpp.

References OpenDDS::Security::SSL::hash(), and shared_secret_.

00048   {
00049     DDS::OctetSeq tmp = shared_secret_;
00050     std::vector<const DDS::OctetSeq*> hash_data;
00051     hash_data.push_back(&tmp);
00052     return SSL::hash(hash_data, shared_secret_);
00053   }

Here is the call graph for this function:

virtual int OpenDDS::Security::SSL::DHAlgorithm::init (  )  [pure virtual]
virtual const char* OpenDDS::Security::SSL::DHAlgorithm::kagree_algo (  )  const [pure virtual]
virtual int OpenDDS::Security::SSL::DHAlgorithm::pub_key ( DDS::OctetSeq dst  )  [pure virtual]

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1