算法整理
csky6688
这个作者很懒,什么都没留下…
展开
-
opensslmd5算法源码c++版
#include "stdafx.h" #include <iostream> #include <string> #include <vector> #include <cstdio> #include <iomanip> #include <stdlib.h> #include <openssl/md5.h> #include "cryptotest.h" usi原创 2016-07-03 20:37:10 · 923 阅读 · 0 评论 -
openssldescbc算法c++版
openssldescbc算法c++版#include <iostream> #include <string> #include <vector> #include <openssl/des.h> #include "cryptotest.h" using namespace std; //STL库static unsigned char cbc_iv[8] = {'0', '原创 2016-07-03 20:38:36 · 1129 阅读 · 0 评论 -
base64算法源码c版
base64算法源码c版#include <stdio.h> //注意哦,VC中""是当前路径,<>是系统路径 #include <windows.h> const char BASE_CODE[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; //base码//编码,参数:要编码的字符串指针原创 2016-07-03 20:39:28 · 1989 阅读 · 0 评论 -
descbc算法java版
descbc算法java版import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.*; import sun.misc.*; /** * DES encryption algorithm, p原创 2016-07-03 20:40:26 · 577 阅读 · 0 评论 -
opensslsha1算法源码c++版
opensslsha1算法源码c++版#include <iostream> #include <openssl/sha.h> #include <openssl/crypto.h> // OPENSSL_cleanse #pragma comment(lib, "libeay32.lib") using namespace std; const char *orgSt原创 2016-07-03 21:57:49 · 1694 阅读 · 0 评论 -
sha1算法源码c版
sha1算法源码c版#include <stdio.h>#include <stdlib.h>#define SHA1_ROTL(a,b) (SHA1_tmp=(a),((SHA1_tmp>>(32-b))&(0x7fffffff>>(31-b)))|(SHA1_tmp<<b))#define SHA1_F(B,C,D,t) ((t<40)?((t<20)?((B&C)|((~B)&D)):(原创 2016-07-03 21:58:28 · 3572 阅读 · 0 评论