From 242d67fb17619670d9b757c442dcf2e26d8478a1 Mon Sep 17 00:00:00 2001 From: weidai Date: Thu, 20 Jan 2005 04:19:35 +0000 Subject: changes done for FIPS-140 lab code drop git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@195 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- elgamal.h | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'elgamal.h') diff --git a/elgamal.h b/elgamal.h index 20f1dc4..377d437 100644 --- a/elgamal.h +++ b/elgamal.h @@ -75,7 +75,7 @@ public: }; template -class CRYPTOPP_NO_VTABLE ElGamalObjectImpl : public DL_ObjectImplBase, public ElGamalBase +class ElGamalObjectImpl : public DL_ObjectImplBase, public ElGamalBase { public: unsigned int FixedMaxPlaintextLength() const {return MaxPlaintextLength(FixedCiphertextLength());} @@ -106,27 +106,11 @@ struct ElGamal static const char * StaticAlgorithmName() {return "ElgamalEnc/Crypto++Padding";} - class EncryptorImpl : public ElGamalObjectImpl, SchemeOptions, SchemeOptions::PublicKey>, public PublicKeyCopier - { - public: - void CopyKeyInto(SchemeOptions::PublicKey &key) const - {key = GetKey();} - }; - - class DecryptorImpl : public ElGamalObjectImpl, SchemeOptions, SchemeOptions::PrivateKey>, public PrivateKeyCopier - { - public: - void CopyKeyInto(SchemeOptions::PublicKey &key) const - {GetKey().MakePublicKey(key);} - void CopyKeyInto(SchemeOptions::PrivateKey &key) const - {key = GetKey();} - }; - typedef SchemeOptions::GroupParameters GroupParameters; //! implements PK_Encryptor interface - typedef PK_FinalTemplate Encryptor; + typedef PK_FinalTemplate, SchemeOptions, SchemeOptions::PublicKey> > Encryptor; //! implements PK_Decryptor interface - typedef PK_FinalTemplate Decryptor; + typedef PK_FinalTemplate, SchemeOptions, SchemeOptions::PrivateKey> > Decryptor; }; typedef ElGamal::Encryptor ElGamalEncryptor; -- cgit v1.2.1