用vb实现DES加解密算法(三)--解密(38) R16(i) = L15(i) Xor CodeP(i) L16(i) = R15(i) Next For i = 0 To 31 BinCode(i) = R16(i) BinCode(i + 32) = L16(i) Next For i = 0 To 63 CodeIP(i) = BinCode(IP_1(i)) Next For i = 0 To 7 tempReturn(i) = CodeIP(i * 8 + 0) * &H80 tempReturn(i) = tempReturn(i) + CodeIP(i * 8 + 1) * &H40 tempReturn(i) = tempReturn(i) + CodeIP(i * 8 + 2) * &H20 tempReturn(i) = tempReturn(i) + CodeIP(i * 8 + 3) * &H10 tempReturn(i) = tempReturn(i) + CodeIP(i * 8 + 4) * &H8 tempReturn(i) = tempReturn(i) + CodeIP(i * 8 + 5) * &H4 tempReturn(i) = tempReturn(i) + CodeIP(i * 8 + 6) * &H2 tempReturn(i) = tempReturn(i) + CodeIP(i * 8 + 7) * &H1 Next
CopyMemory bReturn(j), tempReturn(0), 8Next
End Sub
谨已这篇文章送给和我一样在VB中苦苦挣扎的兄弟们!!