C/C++ 中最好的加密库是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/180870/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the best encryption library in C/C++?
提问by paxos1977
What is the best encryption library in C/C++ In terms of:
C/C++ 中最好的加密库是什么?
- entropy
- quality
- ease of use
- readability
- portability
- performance
- 熵
- 质量
- 便于使用
- 可读性
- 可移植性
- 表现
What's your favorite and why do you like it?
你最喜欢什么,为什么喜欢它?
回答by Rob Walker
回答by Roel
I've used CryptoPP in the past (http://www.cryptopp.com/) and although its API style and programming paradigms take a little getting used to, I liked it in the end. It provides a wide range of symmetric and asymmetric algorithms with much flexibility. Documentation is so-so, the API docs are there but there's little 'high-level' overview and simple sample code. I ended up puzzling together pieces of code from around the net. It was easy to integrate into my project (linked statically). I'm using MSVC - 2003 when I started using it, now switched to 2008. It's portable across several platforms (check out the website). I've always used the default RNG, don't know which one that is.
我过去曾使用过 CryptoPP ( http://www.cryptopp.com/),虽然它的 API 风格和编程范式需要一点时间来适应,但我最终还是喜欢它。它提供了广泛的对称和非对称算法,具有很大的灵活性。文档一般般,API 文档在那里,但几乎没有“高级”概述和简单的示例代码。我最终将网络上的代码拼凑在一起。很容易集成到我的项目中(静态链接)。我开始使用时使用的是 MSVC - 2003,现在切换到 2008。它可以跨多个平台移植(查看网站)。我一直用默认的RNG,不知道是哪个。
回答by bmdhacks
I'm gonna have to go with LibTomCrypt. It's often overlooked for OpenSSL, but TomCrypt is just so lightweight and simple. As for quality, TomCrypt is widely accepted as top-quality encryption. Also, it's license is public domain which avoids the attribution hassle for your documentation that BSD licenses give you when writing commercial software.
我将不得不使用LibTomCrypt。OpenSSL 经常忽略它,但 TomCrypt 是如此轻量级和简单。至于质量,TomCrypt 被广泛接受为顶级加密。此外,它的许可证是公共领域的,这避免了 BSD 许可证在编写商业软件时为您提供的文档归属麻烦。
回答by dicroce
回答by warren
Crypto++seems to have a very good reputation
Crypto++似乎有很好的声誉
Wikipedia - https://en.wikipedia.org/wiki/Crypto%2B%2B
维基百科 - https://en.wikipedia.org/wiki/Crypto%2B%2B
GitHub - https://github.com/weidai11/cryptopp
GitHub - https://github.com/weidai11/cryptopp
回答by Martin Beckett
The C++ version isn't out yet but goolge KeyCzar http://code.google.com/p/keyczar/might be worth looking at. Whatever you feel about their business they do have a lot of smart programmers working for them.
C++ 版本尚未发布,但 goolge KeyCzar http://code.google.com/p/keyczar/可能值得一看。不管你对他们的业务有什么看法,他们确实有很多聪明的程序员为他们工作。
回答by bortzmeyer
GPGme. Simple to use and compatible with the OpenPGP format
GPGme。使用简单且与OpenPGP 格式兼容