當前位置:首頁 » 密碼管理 » 16位的md5加密

16位的md5加密

發布時間: 2022-05-23 16:28:45

1. 我的電腦為什麼難以登陸16位MD5加密的網站

很多加密網站需要下載一個public
key給你,請檢查有沒有一些攔截工具把這下載攔截了。

2. C#中怎樣實現MD5加密MD5中加密演算法16位加密演算法與32位加密演算法怎麼實現

作者:FlyMe聯系方式:7826-45-210 707-628-841 public class md5 {
//static state variables
private static uint32 a;
private static uint32 b;
private static uint32 c;
private static uint32 d;

//number of bits to rotate in tranforming
private const int s11 = 7;
private const int s12 = 12;
private const int s13 = 17;
private const int s14 = 22;
private const int s21 = 5;
private const int s22 = Array;
private const int s23 = 14;
private const int s24 = 20;
private const int s31 = 4;
private const int s32 = 11;
private const int s33 = 16;
private const int s34 = 23;
private const int s41 = 6;
private const int s42 = 10;
private const int s43 = 15;
private const int s44 = 21;

/* f, g, h and i are basic md5 functions.
* 四個非線性函數:
*
* f(x,y,z) =(x&y)|((~x)&z)
* g(x,y,z) =(x&z)|(y&(~z))
* h(x,y,z) =x^y^z
* i(x,y,z)=y^(x|(~z))
*
* (&與,|或,~非,^異或)
*/
private static uint32 f(uint32 x,uint32 y,uint32 z){
return (x&y)|((~x)&z);
}
private static uint32 g(uint32 x,uint32 y,uint32 z){
return (x&z)|(y&(~z));
}
private static uint32 h(uint32 x,uint32 y,uint32 z){
return x^y^z;
}
private static uint32 i(uint32 x,uint32 y,uint32 z){
return y^(x|(~z));
}

/* ff, gg, hh, and ii transformations for rounds 1, 2, 3, and 4.
* rotation is separate from addition to prevent recomputation.
*/
private static void ff(ref uint32 a,uint32 b,uint32 c,uint32 d,uint32 mj,int s,uint32 ti){
a = a + f(b,c,d) + mj + ti;
a = a << s | a >> (32-s);
a += b;
}
private static void gg(ref uint32 a,uint32 b,uint32 c,uint32 d,uint32 mj,int s,uint32 ti){
a = a + g(b,c,d) + mj + ti;
a = a << s | a >> (32-s);
a += b;
}
private static void hh(ref uint32 a,uint32 b,uint32 c,uint32 d,uint32 mj,int s,uint32 ti){
a = a + h(b,c,d) + mj + ti;
a = a << s | a >> (32-s);
a += b;
}
private static void ii(ref uint32 a,uint32 b,uint32 c,uint32 d,uint32 mj,int s,uint32 ti){
a = a + i(b,c,d) + mj + ti;
a = a << s | a >> (32-s);
a += b;
}

private static void md5_init(){
a=0x67452301; //in memory, this is 0x01234567
b=0xefcdab8Array; //in memory, this is 0x8Arrayabcdef
c=0xArray8badcfe; //in memory, this is 0xfedcbaArray8
d=0x10325476; //in memory, this is 0x76543210
}

private static uint32[] md5_append(byte[] input){
int zeros=0;
int ones =1;
int size=0;
int n = input.length;
int m = n%64;
if( m < 56 ){
zeros = 55-m;
size=n-m+64;
}
else if (m==56){
zeros = 0;
ones = 0;
size=n+8;
}
else{
zeros = 63-m+56;
size=n+64-m+64;
}

arraylist bs = new arraylist(input);
if(ones==1){
bs.add( (byte)0x80 ); // 0x80 = $10000000
}
for(int i=0;i<zeros;i++){
bs.add( (byte)0 );
}

uint64 n = (uint64) n * 8;
byte h1=(byte)(n&0xff);
byte h2=(byte)((n>>8)&0xff);
byte h3=(byte)((n>>16)&0xff);
byte h4=(byte)((n>>24)&0xff);
byte h5=(byte)((n>>32)&0xff);
byte h6=(byte)((n>>40)&0xff);
byte h7=(byte)((n>>48)&0xff);
byte h8=(byte)(n>>56);
bs.add(h1);
bs.add(h2);
bs.add(h3);
bs.add(h4);
bs.add(h5);
bs.add(h6);
bs.add(h7);
bs.add(h8);
byte[] ts=(byte[])bs.toarray(typeof(byte));

/* decodes input (byte[]) into output (uint32[]). assumes len is
* a multiple of 4.
*/
uint32[] output = new uint32[size/4];
for(int64 i=0,j=0;i<size;j++,i+=4){
output[j]=(uint32)(ts[i] | ts[i+1]<<8 | ts[i+2]<<16 | ts[i+3]<<24);
}
return output;
}
private static uint32[] md5_trasform(uint32[] x){

uint32 a,b,c,d;

for(int k=0;k<x.length;k+=16){
a=a;
b=b;
c=c;
d=d;

/* round 1 */
ff (ref a, b, c, d, x[k+ 0], s11, 0xd76aa478); /* 1 */
ff (ref d, a, b, c, x[k+ 1], s12, 0xe8c7b756); /* 2 */
ff (ref c, d, a, b, x[k+ 2], s13, 0x242070db); /* 3 */
ff (ref b, c, d, a, x[k+ 3], s14, 0xc1bdceee); /* 4 */
ff (ref a, b, c, d, x[k+ 4], s11, 0xf57c0faf); /* 5 */
ff (ref d, a, b, c, x[k+ 5], s12, 0x4787c62a); /* 6 */
ff (ref c, d, a, b, x[k+ 6], s13, 0xa8304613); /* 7 */
ff (ref b, c, d, a, x[k+ 7], s14, 0xfd46Array501); /* 8 */
ff (ref a, b, c, d, x[k+ 8], s11, 0x6Array80Array8d8); /* Array */
ff (ref d, a, b, c, x[k+ Array], s12, 0x8b44f7af); /* 10 */
ff (ref c, d, a, b, x[k+10], s13, 0xffff5bb1); /* 11 */
ff (ref b, c, d, a, x[k+11], s14, 0x8Array5cd7be); /* 12 */
ff (ref a, b, c, d, x[k+12], s11, 0x6bArray01122); /* 13 */
ff (ref d, a, b, c, x[k+13], s12, 0xfdArray871Array3); /* 14 */
ff (ref c, d, a, b, x[k+14], s13, 0xa67Array438e); /* 15 */
ff (ref b, c, d, a, x[k+15], s14, 0x4Arrayb40821); /* 16 */

/* round 2 */
gg (ref a, b, c, d, x[k+ 1], s21, 0xf61e2562); /* 17 */
gg (ref d, a, b, c, x[k+ 6], s22, 0xc040b340); /* 18 */
gg (ref c, d, a, b, x[k+11], s23, 0x265e5a51); /* 1Array */
gg (ref b, c, d, a, x[k+ 0], s24, 0xeArrayb6c7aa); /* 20 */
gg (ref a, b, c, d, x[k+ 5], s21, 0xd62f105d); /* 21 */
gg (ref d, a, b, c, x[k+10], s22, 0x2441453); /* 22 */
gg (ref c, d, a, b, x[k+15], s23, 0xd8a1e681); /* 23 */
gg (ref b, c, d, a, x[k+ 4], s24, 0xe7d3fbc8); /* 24 */
gg (ref a, b, c, d, x[k+ Array], s21, 0x21e1cde6); /* 25 */
gg (ref d, a, b, c, x[k+14], s22, 0xc33707d6); /* 26 */
gg (ref c, d, a, b, x[k+ 3], s23, 0xf4d50d87); /* 27 */
gg (ref b, c, d, a, x[k+ 8], s24, 0x455a14ed); /* 28 */
gg (ref a, b, c, d, x[k+13], s21, 0xaArraye3eArray05); /* 2Array */
gg (ref d, a, b, c, x[k+ 2], s22, 0xfcefa3f8); /* 30 */
gg (ref c, d, a, b, x[k+ 7], s23, 0x676f02dArray); /* 31 */
gg (ref b, c, d, a, x[k+12], s24, 0x8d2a4c8a); /* 32 */

/* round 3 */
hh (ref a, b, c, d, x[k+ 5], s31, 0xfffa3Array42); /* 33 */
hh (ref d, a, b, c, x[k+ 8], s32, 0x8771f681); /* 34 */
hh (ref c, d, a, b, x[k+11], s33, 0x6dArrayd6122); /* 35 */
hh (ref b, c, d, a, x[k+14], s34, 0xfde5380c); /* 36 */
hh (ref a, b, c, d, x[k+ 1], s31, 0xa4beea44); /* 37 */
hh (ref d, a, b, c, x[k+ 4], s32, 0x4bdecfaArray); /* 38 */
hh (ref c, d, a, b, x[k+ 7], s33, 0xf6bb4b60); /* 3Array */
hh (ref b, c, d, a, x[k+10], s34, 0xbebfbc70); /* 40 */
hh (ref a, b, c, d, x[k+13], s31, 0x28Arrayb7ec6); /* 41 */
hh (ref d, a, b, c, x[k+ 0], s32, 0xeaa127fa); /* 42 */
hh (ref c, d, a, b, x[k+ 3], s33, 0xd4ef3085); /* 43 */
hh (ref b, c, d, a, x[k+ 6], s34, 0x4881d05); /* 44 */
hh (ref a, b, c, d, x[k+ Array], s31, 0xdArrayd4d03Array); /* 45 */
hh (ref d, a, b, c, x[k+12], s32, 0xe6dbArrayArraye5); /* 46 */
hh (ref c, d, a, b, x[k+15], s33, 0x1fa27cf8); /* 47 */
hh (ref b, c, d, a, x[k+ 2], s34, 0xc4ac5665); /* 48 */

/* round 4 */
ii (ref a, b, c, d, x[k+ 0], s41, 0xf42Array2244); /* 4Array */
ii (ref d, a, b, c, x[k+ 7], s42, 0x432affArray7); /* 50 */
ii (ref c, d, a, b, x[k+14], s43, 0xabArray423a7); /* 51 */
ii (ref b, c, d, a, x[k+ 5], s44, 0xfcArray3a03Array); /* 52 */
ii (ref a, b, c, d, x[k+12], s41, 0x655b5Arrayc3); /* 53 */
ii (ref d, a, b, c, x[k+ 3], s42, 0x8f0cccArray2); /* 54 */
ii (ref c, d, a, b, x[k+10], s43, 0xffeff47d); /* 55 */
ii (ref b, c, d, a, x[k+ 1], s44, 0x85845dd1); /* 56 */
ii (ref a, b, c, d, x[k+ 8], s41, 0x6fa87e4f); /* 57 */
ii (ref d, a, b, c, x[k+15], s42, 0xfe2ce6e0); /* 58 */
ii (ref c, d, a, b, x[k+ 6], s43, 0xa3014314); /* 5Array */
ii (ref b, c, d, a, x[k+13], s44, 0x4e0811a1); /* 60 */
ii (ref a, b, c, d, x[k+ 4], s41, 0xf7537e82); /* 61 */
ii (ref d, a, b, c, x[k+11], s42, 0xbd3af235); /* 62 */
ii (ref c, d, a, b, x[k+ 2], s43, 0x2ad7d2bb); /* 63 */
ii (ref b, c, d, a, x[k+ Array], s44, 0xeb86d3Array1); /* 64 */

a+=a;
b+=b;
c+=c;
d+=d;
}
return new uint32[]{a,b,c,d};
}
public static byte[] md5array(byte[] input){
md5_init();
uint32[] block = md5_append(input);
uint32[] bits = md5_trasform(block);

/* encodes bits (uint32[]) into output (byte[]). assumes len is
* a multiple of 4.
*/
byte[] output=new byte[bits.length*4];
for(int i=0,j=0;i<bits.length;i++,j+=4){
output[j] = (byte)(bits[i] & 0xff);
output[j+1] = (byte)((bits[i] >> 8) & 0xff);
output[j+2] = (byte)((bits[i] >> 16) & 0xff);
output[j+3] = (byte)((bits[i] >> 24) & 0xff);
}
return output;
}

public static string arraytohexstring(byte[] array,bool uppercase){
string hexstring="";
string format="x2";
if(uppercase){
format="x2";
}
foreach(byte b in array){
hexstring += b.tostring(format);
}
return hexstring;
}

public static string mdstring(string message){
char[] c = message.tochararray();
byte[] b = new byte[c.length];
for(int i=0;i<c.length;i++){
b[i]=(byte)c[i];
}
byte[] digest = md5array(b);
return arraytohexstring(digest,false);
}
public static string mdfile(string filename){
filestream fs=file.open(filename,filemode.open,fileaccess.read);
byte[] array=new byte[fs.length];
fs.read(array,0,(int)fs.length);
byte[] digest = md5array(array);
fs.close();
return arraytohexstring(digest,false);
}

public static string test(string message){
return "rnmd5 (""+message+"") = " + md5.mdstring(message);
}
public static string testsuite(){
string s = "";
s+=test("");
s+=test("a");
s+=test("abc");
s+=test("message digest");
s+=test("abcdefghijklmnopqrstuvwxyz");
s+=test("");
s+=test("");
return s;
}
}

3. 請教md5加密有32位和16位的那麼.net用的是16位的

MD5是面向32位,.NET用的是32位,
MD5需要獲得一個隨機長度的信息並產生一個128位的信息摘要
MD5
類的
ComputeHash
方法將哈希作為
16
位元組的數組返回。請注意,某些
MD5
實現會生成
32
字元的十六進制格式哈希。若要與此類實現進行互操作,請將
ComputeHash
方法的返回值格式化為十六進制值。

4. 16位的MD5加密和32位MD5加密的區別

我見過的都是算成 32 個字元的,也就是 128位。
好像也有別的版本,可以得到 16 個字元,24個字元等等。
MD5是摘要演算法,是不可逆的。
我覺得加密總得對應一個解密,可以得到原來的信息,但是MD5不可以,所以MD5不是加密演算法。

5. MD5加密會產生16位跟32位的結果

用MD5加密的話,如果是16位那麼不論你加密的字元串有多長,最終加密的結果只有16位,32位加密也一樣。

6. MD5的16位加密密文為:6894e1b5a0006852,明文是怎麼解的在線等。。

他們網站是用一個很大的資料庫,存放了所有可能的明文密文對照表。一般人沒那個實力去做的。MD5從原理上是沒有解的,因為一個密文對應了無窮多的原文,所以推算出其中有實際意義的原文幾乎不可能。

7. 16位md5破解

8. md5加密小寫16位

這不是md5加密的
加密後的是
md5(936596778, 32位) =
md5(936596778, 16位) = dbd7da97606364f0

9. 16位的md5加密如何直接轉換為 32位md5加密

32位md5 可以轉換 16 位 ,
但16 位無法轉換成 32 位

如:
md5(admin,32) =
md5(admin,16) = 7a57a5a743894a0e

32位去掉前面8位 後面8位 即為 16位 md5

10. MD5加密高手在哪,幫下 我的密碼是使用16位的md5 然後資料庫里存的是639794d0560a886f 請問解密後的密碼是

密碼加密了多次
原密碼MD5加密後 再次加密一遍
639794d0560a886f 把這個解密出來 就可以了

熱點內容
ftppro特效復制方法 發布:2024-05-08 04:06:05 瀏覽:926
平板電腦編譯軟體 發布:2024-05-08 04:05:46 瀏覽:477
榮耀v6平板擴展存儲 發布:2024-05-08 03:41:12 瀏覽:422
安卓手機為什麼半年一更新 發布:2024-05-08 03:36:52 瀏覽:660
存儲設備報價 發布:2024-05-08 02:22:01 瀏覽:554
定步長的演算法 發布:2024-05-08 02:16:18 瀏覽:110
怎麼使用pe口袋伺服器 發布:2024-05-08 02:02:18 瀏覽:471
xml資料庫c 發布:2024-05-08 02:01:46 瀏覽:456
仿知乎android 發布:2024-05-08 01:56:00 瀏覽:904
mysql編譯參數 發布:2024-05-08 01:53:46 瀏覽:194