基于J2ME的MD5算法类
state[1] = 0xefcdab89L; state[2] = 0x98badcfeL; state[3] = 0x10325476L; } private long F(long l, long l1, long l2) { return l & l1 | ~l & l2; } private long G(long l, long l1, long l2) { return l & l2 | l1 & ~l2; } private long H(long l, long l1, long l2) { return l ^ l1 ^ l2; } private long I(long l, long l1, long l2) { return l1 ^ (l | ~l2); } private long FF(long l, long l1, long l2, long l3, long l4, long l5, long l6) { l += F(l1, l2, l3) + l4 + l6; l = (int)l << (int)l5 | (int)l >>> (int)(32L - l5); l += l1; return l; } private long GG(long l, long l1, long l2, long l3, long l4, long l5, long l6) { l += G(l1, l2, l3) + l4 + l6; l = (int)l << (int)l5 | (int)l >>> (int)(32L - l5); l += l1; return l; } private long HH(long l, long l1, long l2, long l3, long l4, long l5, long l6) { l += H(l1, l2, l3) + l4 + l6; l = (int)l << (int)l5 | (int)l >>> (int)(32L - l5); l += l1; return l; } private long II(long l, long l1, long l2, long l3, long l4, long l5, long l6) { l += I(l1, l2, l3) + l4 + l6; l = (int)l << (int)l5 | (int)l >>> (int)(32L - l5); l += l1; return l; } private void md5Update(byte abyte0[], int i) {//补位操作,abyte0为需要进行MD5加密的字符串,i为字符串长度; byte abyte1[] = new byte[64]; int k = (int)(count[0] >>> 3) & 0x3f; if((count[0] += i << 3) < (long)(i << 3)) count[1]++;本新闻共 6页,当前在第 2页 1 2 3 4 5 6 | |