~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to dh2.h

  • Committer: noloader
  • Date: 2015-06-29 13:37:03 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:558
Cleared warning on operator precedence

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
class DH2 : public AuthenticatedKeyAgreementDomain
13
13
{
14
14
public:
15
 
        DH2(const SimpleKeyAgreementDomain &domain)
 
15
        DH2(SimpleKeyAgreementDomain &domain)
16
16
                : d1(domain), d2(domain) {}
17
 
        DH2(const SimpleKeyAgreementDomain &staticDomain, const SimpleKeyAgreementDomain &ephemeralDomain)
 
17
        DH2(SimpleKeyAgreementDomain &staticDomain, SimpleKeyAgreementDomain &ephemeralDomain)
18
18
                : d1(staticDomain), d2(ephemeralDomain) {}
19
19
 
 
20
        CryptoParameters & AccessCryptoParameters() {return d1.AccessCryptoParameters();}
 
21
 
20
22
        unsigned int AgreedValueLength() const
21
23
                {return d1.AgreedValueLength() + d2.AgreedValueLength();}
22
24
 
48
50
                bool validateStaticOtherPublicKey=true) const;
49
51
 
50
52
protected:
51
 
        const SimpleKeyAgreementDomain &d1, &d2;
 
53
        SimpleKeyAgreementDomain &d1, &d2;
52
54
};
53
55
 
54
56
NAMESPACE_END