''sCode 待加密字串
''sKey 密钥字串(前8位有效)
Public Sub DES_Encode(ByRef sCode() As Byte, ByVal sKey As String, ByRef bReturn() As Byte)
Attribute DES_Encode.VB_Description = "加密 sCode:明文16进制串 sKey:密钥文本,前8位有效 bReturn:密文16进制串"
Dim tempKey() As Byte ''存放密钥
Dim BinKey(63) As Byte ''64位二进制原始密钥
Dim KeyPC_1(55) As Byte ''存放56位密钥
Dim tempCode(7) As Byte ''存放8位原始明文
Dim tempReturn(7) As Byte ''存放8位密文
Dim BinCode(63) As Byte ''存放64位明文
Dim CodeIP(63) As Byte ''存放IP置换结果
Dim CodeE(47) As Byte ''E膨胀结果
Dim CodeP(31) As Byte ''P变换结果
Dim RetS(47) As Byte ''S盒运算32位结果
Dim S(7) As Byte ''S盒运算8个结果
Dim CodeS1(5) As Byte: Dim CodeS2(5) As Byte: Dim CodeS3(5) As Byte: Dim CodeS4(5) As Byte
Dim CodeS5(5) As Byte: Dim CodeS6(5) As Byte: Dim CodeS7(5) As Byte: Dim CodeS8(5) As Byte
Dim L0(31) As Byte: Dim R0(31) As Byte
Dim L1(31) As Byte: Dim R1(31) As Byte
Dim L2(31) As Byte: Dim R2(31) As Byte
Dim L3(31) As Byte: Dim R3(31) As Byte
Dim L4(31) As Byte: Dim R4(31) As Byte
Dim L5(31) As Byte: Dim R5(31) As Byte
Dim L6(31) As Byte: Dim R6(31) As Byte
Dim L7(31) As Byte: Dim R7(31) As Byte
Dim L8(31) As Byte: Dim R8(31) As Byte
Dim L9(31) As Byte: Dim R9(31) As Byte
Dim L10(31) As Byte: Dim R10(31) As Byte
Dim L11(31) As Byte: Dim R11(31) As Byte
Dim L12(31) As Byte: Dim R12(31) As Byte
Dim L13(31) As Byte: Dim R13(31) As Byte
Dim L14(31) As Byte: Dim R14(31) As Byte
Dim L15(31) As Byte: Dim R15(31) As Byte
Dim L16(31) As Byte: Dim R16(31) As Byte
Dim C0(27) As Byte: Dim D0(27) As Byte ''16个密钥
Dim C1(27) As Byte: Dim D1(27) As Byte
Dim C2(27) As Byte: Dim D2(27) As Byte:
Dim C3(27) As Byte: Dim D3(27) As Byte:
Dim C4(27) As Byte: Dim D4(27) As Byte:
Dim C5(27) As Byte: Dim D5(27) As Byte:
Dim C6(27) As Byte: Dim D6(27) As Byte:
Dim C7(27) As Byte: Dim D7(27) As Byte:
Dim C8(27) As Byte: Dim D8(27) As Byte:
Dim C9(27) As Byte: Dim D9(27) As Byte:
Dim C10(27) As Byte: Dim D10(27) As Byte:
Dim C11(27) As Byte: Dim D11(27) As Byte:
Dim C12(27) As Byte: Dim D12(27) As Byte:
Dim C13(27) As Byte: Dim D13(27) As Byte:
Dim C14(27) As Byte: Dim D14(27) As Byte:
Dim C15(27) As Byte: Dim D15(27) As Byte:
Dim C16(27) As Byte: Dim D16(27) As Byte:
Dim C_D(55) As Byte ''Cn,Dn合并后的存放处
Dim K1(47) As Byte: Dim K2(47) As Byte: Dim K3(47) As Byte: Dim K4(47) As Byte:
Dim K5(47) As Byte: Dim K6(47) As Byte: Dim K7(47) As Byte: Dim K8(47) As Byte:
Dim K9(47) As Byte: Dim K10(47) As Byte: Dim K11(47) As Byte: Dim K12(47) As Byte:
Dim K13(47) As Byte: Dim K14(47) As Byte: Dim K15(47) As Byte: Dim K16(47) As Byte: