在 C++ 中计算 sha-256 的好库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7785188/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 17:29:28  来源:igfitidea点击:

a good library for calculating sha-256 in c++

c++sha256

提问by Bartolinio

I'm trying to find a good library for calculating sha256. I found already a lot of options

我试图找到一个很好的库来计算 sha256。我发现已经有很多选择

crypto++ : http://www.cryptopp.com/

加密++:http: //www.cryptopp.com/

openSSL: http://www.openssl.org/

openSSL:http: //www.openssl.org/

MIRACL: http://www.shamus.ie/

奇迹:http: //www.shamus.ie/

I would much prefer a library that's well-known, widely industrially used and works on all operating systems, rather than the most efficient one.

我更喜欢一个众所周知的、在工业上广泛使用并且适用于所有操作系统的库,而不是最有效的库。

What do you recommend for me? (feel free to recommend on a library that I didn't mention here).

你给我推荐什么?(随意推荐我在这里没有提到的图书馆)。

回答by Lior Kogan

You should consider cryptlib

你应该考虑cryptlib

Works on all operating systems

适用于所有操作系统

Cryptlib is supplied as source code for AMX, BeOS, ChorusOS, DOS, DOS32, eCOS, μC/OS-II, embedded Linux, FreeRTOS/OpenRTOS, IBM MVS, μITRON, Macintosh/OS X, OS/2, PalmOS, RTEMS, Tandem, ThreadX, a variety of Unix versions (including AIX, Digital Unix, DGUX, FreeBSD/NetBSD/OpenBSD, HP-UX, IRIX, Linux, MP-RAS, OSF/1, QNX, SCO/UnixWare, Solaris, SunOS, Ultrix, and UTS4), uClinux, VM/CMS, VxWorks, Windows 3.x, Windows 95/98/ME, Windows CE/PocketPC/SmartPhone, Windows NT/2000/XP/Vista/Windows 7 (32- and 64-bit versions), VDK, and Xilinx XMK. cryptlib's highly portable nature means that it is also being used in a variety of custom embedded system environments.

Cryptlib 作为 AMX、BeOS、ChorusOS、DOS、DOS32、eCOS、μC/OS-II、嵌入式 Linux、FreeRTOS/OpenRTOS、IBM MVS、μITRON、Macintosh/OS X、OS/2、PalmOS、RTEMS、 Tandem、ThreadX、多种Unix版本(包括AIX、Digital Unix、DGUX、FreeBSD/NetBSD/OpenBSD、HP-UX、IRIX、Linux、MP-RAS、OSF/1、QNX、SCO/UnixWare、Solaris、SunOS、 Ultrix 和 UTS4)、uClinux、VM/CMS、VxWorks、Windows 3.x、Windows 95/98/ME、Windows CE/PocketPC/SmartPhone、Windows NT/2000/XP/Vista/Windows 7(32-和 64-位版本)、VDK 和 Xilinx XMK。cryptlib 的高度可移植性意味着它也被用于各种定制的嵌入式系统环境。

Widely industrially used

工业上广泛使用

see Clients

客户

It's not free for commercial use, though.

不过,它不是免费用于商业用途的。