~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to pubkey.h

  • Committer: weidai
  • Date: 2003-07-29 01:18:33 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:118
fix potential threading problem with initialization of static objects

Show diffs side-by-side

added added

removed removed

Lines of Context:
414
414
 
415
415
protected:
416
416
        const typename BASE::MessageEncodingInterface & GetMessageEncodingInterface() const 
417
 
                {static typename SCHEME_OPTIONS::MessageEncodingMethod messageEncodingMethod; return messageEncodingMethod;}
 
417
                {return Singleton<CPP_TYPENAME SCHEME_OPTIONS::MessageEncodingMethod>().Ref();}
418
418
        const TrapdoorFunctionBounds & GetTrapdoorFunctionBounds() const 
419
419
                {return GetKey();}
420
420
        const typename BASE::TrapdoorFunctionInterface & GetTrapdoorFunctionInterface() const 
1322
1322
 
1323
1323
protected:
1324
1324
        const DL_ElgamalLikeSignatureAlgorithm<Element> & GetSignatureAlgorithm() const
1325
 
                {static typename SCHEME_OPTIONS::SignatureAlgorithm a; return a;}
 
1325
                {return Singleton<CPP_TYPENAME SCHEME_OPTIONS::SignatureAlgorithm>().Ref();}
1326
1326
        const DL_KeyAgreementAlgorithm<Element> & GetKeyAgreementAlgorithm() const
1327
 
                {static typename SCHEME_OPTIONS::KeyAgreementAlgorithm a; return a;}
 
1327
                {return Singleton<CPP_TYPENAME SCHEME_OPTIONS::KeyAgreementAlgorithm>().Ref();}
1328
1328
        const DL_KeyDerivationAlgorithm<Element> & GetKeyDerivationAlgorithm() const
1329
 
                {static typename SCHEME_OPTIONS::KeyDerivationAlgorithm a; return a;}
 
1329
                {return Singleton<CPP_TYPENAME SCHEME_OPTIONS::KeyDerivationAlgorithm>().Ref();}
1330
1330
        const DL_SymmetricEncryptionAlgorithm & GetSymmetricEncryptionAlgorithm() const
1331
 
                {static typename SCHEME_OPTIONS::SymmetricEncryptionAlgorithm a; return a;}
 
1331
                {return Singleton<CPP_TYPENAME SCHEME_OPTIONS::SymmetricEncryptionAlgorithm>().Ref();}
1332
1332
        HashIdentifier GetHashIdentifier() const
1333
1333
                {return HashIdentifier();}
1334
1334
        const PK_SignatureMessageEncodingMethod & GetMessageEncodingInterface() const 
1335
 
                {static typename SCHEME_OPTIONS::MessageEncodingMethod a; return a;}
 
1335
                {return Singleton<CPP_TYPENAME SCHEME_OPTIONS::MessageEncodingMethod>().Ref();}
1336
1336
};
1337
1337
 
1338
1338
//! .