From 572fe07633123ce38abf28c6426356e37aef3a99 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 4 Jul 2003 00:17:37 +0000 Subject: create DLL version, fix GetNextIV() bug in CTR and OFB modes git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@87 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- fips140.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'fips140.h') diff --git a/fips140.h b/fips140.h index 76353ed..f46eff6 100644 --- a/fips140.h +++ b/fips140.h @@ -10,26 +10,36 @@ NAMESPACE_BEGIN(CryptoPP) //! exception thrown when a crypto algorithm is used after a self test fails -class SelfTestFailure : public Exception +class CRYPTOPP_DLL SelfTestFailure : public Exception { public: explicit SelfTestFailure(const std::string &s) : Exception(OTHER_ERROR, s) {} }; //! returns whether FIPS 140-2 compliance features were enabled at compile time -bool FIPS_140_2_ComplianceEnabled(); +CRYPTOPP_DLL bool FIPS_140_2_ComplianceEnabled(); //! enum values representing status of the power-up self test enum PowerUpSelfTestStatus {POWER_UP_SELF_TEST_NOT_DONE, POWER_UP_SELF_TEST_FAILED, POWER_UP_SELF_TEST_PASSED}; //! perform the power-up self test, and set the self test status -void DoPowerUpSelfTest(const char *moduleFilename, const byte *expectedModuleSha1Digest); +CRYPTOPP_DLL void DoPowerUpSelfTest(const char *moduleFilename, const byte *expectedModuleMac); //! set the power-up self test status to POWER_UP_SELF_TEST_FAILED -void SimulatePowerUpSelfTestFailure(); +CRYPTOPP_DLL void SimulatePowerUpSelfTestFailure(); //! return the current power-up self test status -PowerUpSelfTestStatus GetPowerUpSelfTestStatus(); +CRYPTOPP_DLL PowerUpSelfTestStatus CRYPTOPP_API GetPowerUpSelfTestStatus(); + +typedef PowerUpSelfTestStatus (CRYPTOPP_API * PGetPowerUpSelfTestStatus)(); + +CRYPTOPP_DLL const byte * CRYPTOPP_API GetActualMacAndLocation(unsigned int &macSize, unsigned int &fileLocation); + +typedef const byte * (CRYPTOPP_API * PGetActualMacAndLocation)(unsigned int &macSize, unsigned int &fileLocation); + +CRYPTOPP_DLL MessageAuthenticationCode * NewIntegrityCheckingMAC(); + +CRYPTOPP_DLL bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModuleMac, SecByteBlock *pActualMac = NULL, unsigned long *pMacFileLocation = NULL); // this is used by Algorithm constructor to allow Algorithm objects to be constructed for the self test bool PowerUpSelfTestInProgressOnThisThread(); -- cgit v1.2.1