~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to gfpcrypt.h

  • Committer: weidai
  • Date: 2007-05-04 15:36:15 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:339
fix compile

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters<Integer>;
21
21
 
22
22
//! _
23
 
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBased : public DL_GroupParameters<Integer>, public ASN1CryptoMaterial
 
23
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBased : public ASN1CryptoMaterial<DL_GroupParameters<Integer> >
24
24
{
25
25
        typedef DL_GroupParameters_IntegerBased ThisClass;
26
26
        
219
219
                {this->AccessGroupParameters().Initialize(p, q, g); this->SetPublicElement(y);}
220
220
 
221
221
        // X509PublicKey
222
 
        void BERDecodeKey(BufferedTransformation &bt)
 
222
        void BERDecodePublicKey(BufferedTransformation &bt, bool, size_t)
223
223
                {this->SetPublicElement(Integer(bt));}
224
 
        void DEREncodeKey(BufferedTransformation &bt) const
 
224
        void DEREncodePublicKey(BufferedTransformation &bt) const
225
225
                {this->GetPublicElement().DEREncode(bt);}
226
226
};
227
227
 
451
451
                if (DHAES_MODE)
452
452
                {
453
453
                        byte L[8] = {0,0,0,0};
454
 
                        UnalignedPutWord(BIG_ENDIAN_ORDER, L+4, word32(encodingParameters.size()));
 
454
                        PutWord(false, BIG_ENDIAN_ORDER, L+4, word32(encodingParameters.size()));
455
455
                        mac.Update(L, 8);
456
456
                }
457
457
                mac.Final(ciphertext + plaintextLength);
480
480
                if (DHAES_MODE)
481
481
                {
482
482
                        byte L[8] = {0,0,0,0};
483
 
                        UnalignedPutWord(BIG_ENDIAN_ORDER, L+4, word32(encodingParameters.size()));
 
483
                        PutWord(false, BIG_ENDIAN_ORDER, L+4, word32(encodingParameters.size()));
484
484
                        mac.Update(L, 8);
485
485
                }
486
486
                if (!mac.Verify(ciphertext + plaintextLength))