Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
KeyPair m_ephemeral
Ephemeral keypair; generated.
Simple class that represents a "key pair".
Secret const & secret() const
void agree(Public const &_remoteEphemeral, Secret &o_sharedSecret) const
Input public key for dh agreement, output generated shared secret.
Public pubkey()
Public key sent to remote.
Public const & pub() const
Retrieve the public key.
ECDHE()
Constructor (pass public key for ingress exchange).
Public m_remoteEphemeral
Public key of remote; parameter. Set once when agree is called, otherwise immutable.
Derive DH shared secret from EC keypairs.