Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to call the cipher library of CAccord + Crypto

2025-03-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to call Crypto password library". In the daily operation, I believe many people have doubts about how to call the password library of Crypto. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts of "how to call Crypto password library". Next, please follow the editor to study!

Sha256 encryption algorithm

Sha series encryption algorithms include many, basically have the following formats of encryption, the larger the number of bits, the greater the encryption strength, this algorithm is an one-way encryption algorithm similar to MD5, but more secure than MD5.

SHA-1: the performance of generating feeds is slightly lower than that of MD5

SHA-256: can generate a summary of information about the length 256bit

SHA-224: can generate a summary of information about the length 224bit

SHA-384: can generate a summary of information about the length 384bit

SHA-512: can generate a summary of information about the length 512bit

# include # pragma comment (lib, "cryptlib.lib") SHA256 value of using namespace std;using namespace CryptoPP;// calculation file string CalSHA256_ByFile (char * pszFileName) {string value; SHA256 sha256; FileSource (pszFileName, true, new HashFilter (sha256, new HexEncoder (new StringSink (value); return value;} / / SHA256 value of calculation data string CalSHA256_ByMem (PBYTE pData, DWORD dwDataSize) {string value; SHA256 sha256 StringSource (pData, dwDataSize, true, new HashFilter (sha256, new HexEncoder (new StringSink (value); return value;} int main (int argc, char * argv []) {string src = "hello lyshark"; string dst; / / use MD5 md5; StringSource (src, true, new HashFilter (md5, new HexEncoder (new StringSink (dst); cout

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 225

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report