fix missing function
parent
f651a6502e
commit
c46f00c4fa
5
dh2.cpp
5
dh2.cpp
|
|
@ -5,6 +5,11 @@
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
|
void DH2_TestInstantiations()
|
||||||
|
{
|
||||||
|
DH2 dh(*(SimpleKeyAgreementDomain*)NULL);
|
||||||
|
}
|
||||||
|
|
||||||
bool DH2::Agree(byte *agreedValue,
|
bool DH2::Agree(byte *agreedValue,
|
||||||
const byte *staticSecretKey, const byte *ephemeralSecretKey,
|
const byte *staticSecretKey, const byte *ephemeralSecretKey,
|
||||||
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,
|
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,
|
||||||
|
|
|
||||||
8
dh2.h
8
dh2.h
|
|
@ -12,11 +12,13 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||||
class DH2 : public AuthenticatedKeyAgreementDomain
|
class DH2 : public AuthenticatedKeyAgreementDomain
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DH2(const SimpleKeyAgreementDomain &domain)
|
DH2(SimpleKeyAgreementDomain &domain)
|
||||||
: d1(domain), d2(domain) {}
|
: d1(domain), d2(domain) {}
|
||||||
DH2(const SimpleKeyAgreementDomain &staticDomain, const SimpleKeyAgreementDomain &ephemeralDomain)
|
DH2(SimpleKeyAgreementDomain &staticDomain, SimpleKeyAgreementDomain &ephemeralDomain)
|
||||||
: d1(staticDomain), d2(ephemeralDomain) {}
|
: d1(staticDomain), d2(ephemeralDomain) {}
|
||||||
|
|
||||||
|
CryptoParameters & AccessCryptoParameters() {return d1.AccessCryptoParameters();}
|
||||||
|
|
||||||
unsigned int AgreedValueLength() const
|
unsigned int AgreedValueLength() const
|
||||||
{return d1.AgreedValueLength() + d2.AgreedValueLength();}
|
{return d1.AgreedValueLength() + d2.AgreedValueLength();}
|
||||||
|
|
||||||
|
|
@ -48,7 +50,7 @@ public:
|
||||||
bool validateStaticOtherPublicKey=true) const;
|
bool validateStaticOtherPublicKey=true) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const SimpleKeyAgreementDomain &d1, &d2;
|
SimpleKeyAgreementDomain &d1, &d2;
|
||||||
};
|
};
|
||||||
|
|
||||||
NAMESPACE_END
|
NAMESPACE_END
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue