diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-04 00:17:37 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-04 00:17:37 +0000 |
commit | 572fe07633123ce38abf28c6426356e37aef3a99 (patch) | |
tree | 0536d87e504a82920156c239bc5ae6aa43e70ebc /fips140.h | |
parent | 3e8c979ddc194e043567c036321e67c89f847362 (diff) | |
download | cryptopp-572fe07633123ce38abf28c6426356e37aef3a99.tar.gz |
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
Diffstat (limited to 'fips140.h')
-rw-r--r-- | fips140.h | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -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(); |