Crypto++ 动态链接编译与实例测试

测试用例的来源《Crypto++入门学习笔记(DES、AES、RSA、SHA-256)

解决在初始化加密器对象时触发异常的问题:

CryptoPP::AESEncryption aesEncryptor;

//触发“Cryptographic algorithms are disabled after a power-up self test failed”异常,解决办法是cryptdll库的pch.h文件中添加如下宏定义:

#define CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 0
#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 == 1
#pragma message("FIPS Compliance is Enabled")
#elif CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 == 0
#pragma message("FIPS Compliance is Disabled")
#else
#pragma message("FIPS Compliance is Ambiguous")
#endif

该问题的详细信息可以参考如下两个链接:

https://groups.google.com/forum/#!topic/cryptopp-users/8-2NLhbHFfk

https://groups.google.com/forum/#!topic/cryptopp-users/VgbrrrNjv14

 

posted on 2016-04-15 14:20  wanghaiyang1930  阅读(1212)  评论(0编辑  收藏  举报

导航