Blowfish加解密算法源码(C++实现的)
Blowfish加解密算法源码(C++实现的)加解密原理可以参考文章:BlowFish加解密原理与代码实现
调用示例:
#include <iostream>
#include "blowfish.h"
int main(int argc, const char * argv[])
{
unsigned char key[] = "The quick brown fox jumps over the lazy dog.";
Blowfish blowfish;
blowfish.SetKey(key, sizeof(key));
// Input/Output length must be a multiple of the block length (64bit)
unsigned char text = "There's nothing";
blowfish.Encrypt(text, text, sizeof(text));
std::cout << text << std::endl;
blowfish.Decrypt(text, text, sizeof(text));
std::cout << text << std::endl;
return 0;
}
```
static/image/hrline/1.gif
**** Hidden Message *****
提取码下载:
页:
[1]