1
0

move cryptopp into lib

This commit is contained in:
Alexander Harkness
2013-11-24 14:21:13 +00:00
parent 675b4aa878
commit 3438e5d3dd
193 changed files with 0 additions and 0 deletions

22
lib/cryptopp/dh2.cpp Normal file
View File

@@ -0,0 +1,22 @@
// dh2.cpp - written and placed in the public domain by Wei Dai
#include "pch.h"
#include "dh2.h"
NAMESPACE_BEGIN(CryptoPP)
void DH2_TestInstantiations()
{
DH2 dh(*(SimpleKeyAgreementDomain*)NULL);
}
bool DH2::Agree(byte *agreedValue,
const byte *staticSecretKey, const byte *ephemeralSecretKey,
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,
bool validateStaticOtherPublicKey) const
{
return d1.Agree(agreedValue, staticSecretKey, staticOtherPublicKey, validateStaticOtherPublicKey)
&& d2.Agree(agreedValue+d1.AgreedValueLength(), ephemeralSecretKey, ephemeralOtherPublicKey, true);
}
NAMESPACE_END