| 网站首页 | VB.Net实例分析 | .Net技术文摘 | 下载中心 | VB.Net书籍笔记 | .Net源码 | VBS脚本与组件调用 | Windows2008技术文摘 | 给我们留言 | 
最新公告:

  没有公告

您现在的位置: 乐博网 >> VB.Net实例分析 >> 加密压缩编程 >> 实例分析正文
最新推荐 更多内容
Blowfish加密算法的实例
Blowfish加密算法的实例
作者:佚名    来源:乐博网收集     更新时间:2007-12-2

乐博网在对qq聊天记录文件MsgEx.db的分析中需要用到Blowfish解密算法,故收集了部分对Blowfish加密算法的类,在国外搜索到一款vb中关于Blowfish的完整源码,希望对你有所帮助。

代码如下:

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsBlowfish"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

' Visual Basic Blowfish Implementation
' Algorithm Author: Bruce Schneier
' VB Implementation: David Midkiff (mdj2023@hotmail.com)
'
' Standard Blowfish implementation with file support, hex conversion,
' speed string concatenation and overall optimisations for Visual Basic.
' Blowfish is considered one of the strongest encryption algorithms on
' the market and is much faster then the IDEA cipher. It supports variable
' length keys up to 448-bits. I would recommend this cipher for high
' security risk related solutions since it is unpatented and free for use.
'
' Information on the Blowfish algorithm can be found at:
' http://www.counterpane.com/blowfish.html

Private Declare Sub CopyMem Lib "KERNEL32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)

Event Progress(Percent As Long)

Private Const ROUNDS = 16

Private m_pBox(0 To ROUNDS + 1) As Long
Private m_sBox(0 To 3, 0 To 255) As Long
Private m_KeyValue As String
Private m_RunningCompiled As Boolean
Private byteArray() As Byte
Private hiByte As Long
Private hiBound As Long
Private Sub Append(ByRef StringData As String, Optional Length As Long)
    Dim DataLength As Long
    If Length > 0 Then DataLength = Length Else DataLength = Len(StringData)
    If DataLength + hiByte > hiBound Then
        hiBound = hiBound + 1024
        ReDim Preserve byteArray(hiBound)
    End If
    CopyMem ByVal VarPtr(byteArray(hiByte)), ByVal StringData, DataLength
    hiByte = hiByte + DataLength
End Sub
Private Property Get GData() As String
    Dim StringData As String
    StringData = Space(hiByte)
    CopyMem ByVal StringData, ByVal VarPtr(byteArray(0)), hiByte
    GData = StringData
End Property

Private Sub Reset()
    hiByte = 0
    hiBound = 1024
    ReDim byteArray(hiBound)
End Sub
Private Static Sub DecryptBlock(Xl As Long, Xr As Long)
    Dim i As Long, j As Long, K As Long
    K = Xr
    Xr = Xl Xor m_pBox(ROUNDS + 1)
    Xl = K Xor m_pBox(ROUNDS)
    j = ROUNDS - 2
    For i = 0 To (ROUNDS \ 2 - 1)
        Xl = Xl Xor f(Xr)
        Xr = Xr Xor m_pBox(j + 1)
        Xr = Xr Xor f(Xl)
        Xl = Xl Xor m_pBox(j)
        j = j - 2
    Next
End Sub
Private Static Sub EncryptBlock(Xl As Long, Xr As Long)
    Dim i As Long, j As Long, Temp As Long
    j = 0
    For i = 0 To (ROUNDS \ 2 - 1)
        Xl = Xl Xor m_pBox(j)
        Xr = Xr Xor f(Xl)
        Xr = Xr Xor m_pBox(j + 1)
        Xl = Xl Xor f(Xr)
        j = j + 2
    Next
    Temp = Xr
    Xr = Xl Xor m_pBox(ROUNDS)
    Xl = Temp Xor m_pBox(ROUNDS + 1)
End Sub
Public Sub EncryptByte(byteArray() As Byte, Optional Key As String)
    Dim Offset As Long, OrigLen As Long, LeftWord As Long, RightWord As Long, CipherLen As Long, CipherLeft As Long, CipherRight As Long, CurrPercent As Long, NextPercent As Long
    If (Len(Key) > 0) Then Me.Key = Key
    OrigLen = UBound(byteArray) + 1
    CipherLen = OrigLen + 12
    If (CipherLen Mod 8 <> 0) Then CipherLen = CipherLen + 8 - (CipherLen Mod 8)
    ReDim Preserve byteArray(CipherLen - 1)
    Call CopyMem(byteArray(12), byteArray(0), OrigLen)
    Call CopyMem(byteArray(8), OrigLen, 4)
    Call Randomize
    Call CopyMem(byteArray(0), CLng(2147483647 * Rnd), 4)
    Call CopyMem(byteArray(4), CLng(2147483647 * Rnd), 4)
    For Offset = 0 To (CipherLen - 1) Step 8
        Call GetWord(LeftWord, byteArray(), Offset)
        Call GetWord(RightWord, byteArray(), Offset + 4)
        LeftWord = LeftWord Xor CipherLeft
        RightWord = RightWord Xor CipherRight
        Call EncryptBlock(LeftWord, RightWord)
        Call PutWord(LeftWord, byteArray(), Offset)
        Call PutWord(RightWord, byteArray(), Offset + 4)
        CipherLeft = LeftWord
        CipherRight = RightWord
        If (Offset >= NextPercent) Then
            CurrPercent = Int((Offset / CipherLen) * 100)
            NextPercent = (CipherLen * ((CurrPercent + 1) / 100)) + 1
            RaiseEvent Progress(CurrPercent)
        End If
    Next
    If (CurrPercent <> 100) Then RaiseEvent Progress(100)
End Sub
Public Function EncryptString(Text As String, Optional Key As String, Optional OutputInHex As Boolean) As String
    Dim byteArray() As Byte
    byteArray() = StrConv(Text, vbFromUnicode)
    Call EncryptByte(byteArray(), Key)
    EncryptString = StrConv(byteArray(), vbUnicode)
    If OutputInHex = True Then EncryptString = EnHex(EncryptString)
End Function
Public Function DecryptString(Text As String, Optional Key As String, Optional IsTextInHex As Boolean) As String
    Dim byteArray() As Byte
    If IsTextInHex = True Then Text = DeHex(Text)
    byteArray() = StrConv(Text, vbFromUnicode)
    Call DecryptByte(byteArray(), Key)
    DecryptString = StrConv(byteArray(), vbUnicode)
End Function
Private Function EnHex(Data As String) As String
    Dim iCount As Double, sTemp As String
    Reset
    For iCount = 1 To Len(Data)
        sTemp = Hex$(Asc(Mid$(Data, iCount, 1)))
        If Len(sTemp) < 2 Then sTemp = "0" & sTemp
        Append sTemp
    Next
    EnHex = GData
    Reset
End Function
Private Function DeHex(Data As String) As String
    Dim iCount As Double
    Reset
    For iCount = 1 To Len(Data) Step 2
        Append Chr$(Val("&H" & Mid$(Data, iCount, 2)))
    Next
    DeHex = GData
    Reset
End Function
Public Sub DecryptByte(byteArray() As Byte, Optional Key As String)
    On Error GoTo errorhandler
    Dim Offset As Long, OrigLen As Long, LeftWord As Long, RightWord As Long, CipherLen As Long, CipherLeft As Long, CipherRight As Long, CurrPercent As Long, NextPercent As Long
    If (Len(Key) > 0) Then Me.Key = Key
    CipherLen = UBound(byteArray) + 1
    For Offset = 0 To (CipherLen - 1) Step 8
        Call GetWord(LeftWord, byteArray(), Offset)
        Call GetWord(RightWord, byteArray(), Offset + 4)
        Call DecryptBlock(LeftWord, RightWord)
        LeftWord = LeftWord Xor CipherLeft
        RightWord = RightWord Xor CipherRight
        Call GetWord(CipherLeft, byteArray(), Offset)
        Call GetWord(CipherRight, byteArray(), Offset + 4)
        Call PutWord(LeftWord, byteArray(), Offset)
        Call PutWord(RightWord, byteArray(), Offset + 4)
        If Offset >= NextPercent Then
            CurrPercent = Int((Offset / CipherLen) * 100)
            NextPercent = (CipherLen * ((CurrPercent + 1) / 100)) + 1
            RaiseEvent Progress(CurrPercent)
        End If
    Next
    Call CopyMem(OrigLen, byteArray(8), 4)
    If (CipherLen - OrigLen > 19) Or (CipherLen - OrigLen < 12) Then Call Err.Raise(vbObjectError, , "Incorrect size descriptor in Blowfish decryption")
    Call CopyMem(byteArray(0), byteArray(12), OrigLen)
    ReDim Preserve byteArray(OrigLen - 1)
    If CurrPercent <> 100 Then RaiseEvent Progress(100)

errorhandler:
End Sub
Private Static Function f(ByVal X As Long) As Long
    Dim xb(0 To 3) As Byte
    Call CopyMem(xb(0), X, 4)
    If (m_RunningCompiled) Then f = (((m_sBox(0, xb(3)) + m_sBox(1, xb(2))) Xor m_sBox(2, xb(1))) + m_sBox(3, xb(0))) Else f = UnsignedAdd((UnsignedAdd(m_sBox(0, xb(3)), m_sBox(1, xb(2))) Xor m_sBox(2, xb(1))), m_sBox(3, xb(0)))
End Function
Private Static Sub GetWord(LongValue As Long, CryptBuffer() As Byte, Offset As Long)
    Dim bb(0 To 3) As Byte
    bb(3) = CryptBuffer(Offset)
    bb(2) = CryptBuffer(Offset + 1)
    bb(1) = CryptBuffer(Offset + 2)
    bb(0) = CryptBuffer(Offset + 3)
    Call CopyMem(LongValue, bb(0), 4)
End Sub
Private Static Sub PutWord(LongValue As Long, CryptBuffer() As Byte, Offset As Long)
    Dim bb(0 To 3) As Byte
    Call CopyMem(bb(0), LongValue, 4)
    CryptBuffer(Offset) = bb(3)
    CryptBuffer(Offset + 1) = bb(2)
    CryptBuffer(Offset + 2) = bb(1)
    CryptBuffer(Offset + 3) = bb(0)
End Sub
Private Static Function UnsignedAdd(ByVal Data1 As Long, Data2 As Long) As Long
    Dim x1(0 To 3) As Byte, x2(0 To 3) As Byte, xx(0 To 3) As Byte, Rest As Long, Value As Long, a As Long
    Call CopyMem(x1(0), Data1, 4)
    Call CopyMem(x2(0), Data2, 4)
    Rest = 0
    For a = 0 To 3
        Value = CLng(x1(a)) + CLng(x2(a)) + Rest
        xx(a) = Value And 255
        Rest = Value \ 256
    Next
    Call CopyMem(UnsignedAdd, xx(0), 4)
End Function
Private Function UnsignedDel(Data1 As Long, Data2 As Long) As Long
    Dim x1(0 To 3) As Byte, x2(0 To 3) As Byte, xx(0 To 3) As Byte, Rest As Long, Value As Long, a As Long
    Call CopyMem(x1(0), Data1, 4)
    Call CopyMem(x2(0), Data2, 4)
    Call CopyMem(xx(0), UnsignedDel, 4)
    For a = 0 To 3
        Value = CLng(x1(a)) - CLng(x2(a)) - Rest
        If (Value < 0) Then
            Value = Value + 256
            Rest = 1
        Else
            Rest = 0
        End If
        xx(a) = Value
    Next
    Call CopyMem(UnsignedDel, xx(0), 4)
End Function
Public Property Let Key(New_Value As String)
    Dim i As Long, j As Long, K As Long, dataX As Long, datal As Long, datar As Long, Key() As Byte, KeyLength As Long
    If (m_KeyValue = New_Value) Then Exit Property
    m_KeyValue = New_Value
    KeyLength = Len(New_Value)
    Key() = StrConv(New_Value, vbFromUnicode)
    j = 0
    For i = 0 To (ROUNDS + 1)
        dataX = 0
        For K = 0 To 3
            Call CopyMem(ByVal VarPtr(dataX) + 1, dataX, 3)
            dataX = (dataX Or Key(j))
            j = j + 1
            If (j >= KeyLength) Then j = 0
        Next
        m_pBox(i) = m_pBox(i) Xor dataX
    Next
   
    datal = 0: datar = 0
    For i = 0 To (ROUNDS + 1) Step 2
        Call EncryptBlock(datal, datar)
        m_pBox(i) = datal
        m_pBox(i + 1) = datar
    Next
    For i = 0 To 3
        For j = 0 To 255 Step 2
            Call EncryptBlock(datal, datar)
            m_sBox(i, j) = datal
            m_sBox(i, j + 1) = datar
        Next
    Next
End Property
Private Sub Class_Initialize()
On Local Error Resume Next
  m_RunningCompiled = ((2147483647 + 1) < 0)
  m_pBox(0) = &H243F6A88
  m_pBox(1) = &H85A308D3
  m_pBox(2) = &H13198A2E
  m_pBox(3) = &H3707344
  m_pBox(4) = &HA4093822
  m_pBox(5) = &H299F31D0
  m_pBox(6) = &H82EFA98
  m_pBox(7) = &HEC4E6C89
  m_pBox(8) = &H452821E6
  m_pBox(9) = &H38D01377
  m_pBox(10) = &HBE5466CF
  m_pBox(11) = &H34E90C6C
  m_pBox(12) = &HC0AC29B7
  m_pBox(13) = &HC97C50DD
  m_pBox(14) = &H3F84D5B5
  m_pBox(15) = &HB5470917
  m_pBox(16) = &H9216D5D9
  m_pBox(17) = &H8979FB1B
  m_sBox(0, 0) = &HD1310BA6
  m_sBox(1, 0) = &H98DFB5AC
  m_sBox(2, 0) = &H2FFD72DB
  m_sBox(3, 0) = &HD01ADFB7
  m_sBox(0, 1) = &HB8E1AFED
  m_sBox(1, 1) = &H6A267E96
  m_sBox(2, 1) = &HBA7C9045
  m_sBox(3, 1) = &HF12C7F99
  m_sBox(0, 2) = &H24A19947
  m_sBox(1, 2) = &HB3916CF7
  m_sBox(2, 2) = &H801F2E2
  m_sBox(3, 2) = &H858EFC16
  m_sBox(0, 3) = &H636920D8
  m_sBox(1, 3) = &H71574E69
  m_sBox(2, 3) = &HA458FEA3
  m_sBox(3, 3) = &HF4933D7E
  m_sBox(0, 4) = &HD95748F
  m_sBox(1, 4) = &H728EB658
  m_sBox(2, 4) = &H718BCD58
  m_sBox(3, 4) = &H82154AEE
  m_sBox(0, 5) = &H7B54A41D
  m_sBox(1, 5) = &HC25A59B5
  m_sBox(2, 5) = &H9C30D539
  m_sBox(3, 5) = &H2AF26013
  m_sBox(0, 6) = &HC5D1B023
  m_sBox(1, 6) = &H286085F0
  m_sBox(2, 6) = &HCA417918
  m_sBox(3, 6) = &HB8DB38EF
  m_sBox(0, 7) = &H8E79DCB0
  m_sBox(1, 7) = &H603A180E
  m_sBox(2, 7) = &H6C9E0E8B
  m_sBox(3, 7) = &HB01E8A3E
  m_sBox(0, 8) = &HD71577C1
  m_sBox(1, 8) = &HBD314B27
  m_sBox(2, 8) = &H78AF2FDA
  m_sBox(3, 8) = &H55605C60
  m_sBox(0, 9) = &HE65525F3
  m_sBox(1, 9) = &HAA55AB94
  m_sBox(2, 9) = &H57489862
  m_sBox(3, 9) = &H63E81440
  m_sBox(0, 10) = &H55CA396A
  m_sBox(1, 10) = &H2AAB10B6
  m_sBox(2, 10) = &HB4CC5C34
  m_sBox(3, 10) = &H1141E8CE
  m_sBox(0, 11) = &HA15486AF
  m_sBox(1, 11) = &H7C72E993
  m_sBox(2, 11) = &HB3EE1411
  m_sBox(3, 11) = &H636FBC2A
  m_sBox(0, 12) = &H2BA9C55D
  m_sBox(1, 12) = &H741831F6
  m_sBox(2, 12) = &HCE5C3E16
  m_sBox(3, 12) = &H9B87931E
  m_sBox(0, 13) = &HAFD6BA33
  m_sBox(1, 13) = &H6C24CF5C
  m_sBox(2, 13) = &H7A325381
  m_sBox(3, 13) = &H28958677
  m_sBox(0, 14) = &H3B8F4898
  m_sBox(1, 14) = &H6B4BB9AF
  m_sBox(2, 14) = &HC4BFE81B
  m_sBox(3, 14) = &H66282193
  m_sBox(0, 15) = &H61D809CC
  m_sBox(1, 15) = &HFB21A991
  m_sBox(2, 15) = &H487CAC60
  m_sBox(3, 15) = &H5DEC8032
  m_sBox(0, 16) = &HEF845D5D
  m_sBox(1, 16) = &HE98575B1
  m_sBox(2, 16) = &HDC262302
  m_sBox(3, 16) = &HEB651B88
  m_sBox(0, 17) = &H23893E81
  m_sBox(1, 17) = &HD396ACC5
  m_sBox(2, 17) = &HF6D6FF3
  m_sBox(3, 17) = &H83F44239
  m_sBox(0, 18) = &H2E0B4482
  m_sBox(1, 18) = &HA4842004
  m_sBox(2, 18) = &H69C8F04A
  m_sBox(3, 18) = &H9E1F9B5E
  m_sBox(0, 19) = &H21C66842
  m_sBox(1, 19) = &HF6E96C9A
  m_sBox(2, 19) = &H670C9C61
  m_sBox(3, 19) = &HABD388F0
  m_sBox(0, 20) = &H6A51A0D2
  m_sBox(1, 20) = &HD8542F68
  m_sBox(2, 20) = &H960FA728
  m_sBox(3, 20) = &HAB5133A3
  m_sBox(0, 21) = &H6EEF0B6C
  m_sBox(1, 21) = &H137A3BE4
  m_sBox(2, 21) = &HBA3BF050
  m_sBox(3, 21) = &H7EFB2A98
  m_sBox(0, 22) = &HA1F1651D
  m_sBox(1, 22) = &H39AF0176
  m_sBox(2, 22) = &H66CA593E
  m_sBox(3, 22) = &H82430E88
  m_sBox(0, 23) = &H8CEE8619
  m_sBox(1, 23) = &H456F9FB4
  m_sBox(2, 23) = &H7D84A5C3
  m_sBox(3, 23) = &H3B8B5EBE
  m_sBox(0, 24) = &HE06F75D8
  m_sBox(1, 24) = &H85C12073
  m_sBox(2, 24) = &H401A449F
  m_sBox(3, 24) = &H56C16AA6
  m_sBox(0, 25) = &H4ED3AA62
  m_sBox(1, 25) = &H363F7706
  m_sBox(2, 25) = &H1BFEDF72
  m_sBox(3, 25) = &H429B023D
  m_sBox(0, 26) = &H37D0D724
  m_sBox(1, 26) = &HD00A1248
  m_sBox(2, 26) = &HDB0FEAD3
  m_sBox(3, 26) = &H49F1C09B
  m_sBox(0, 27) = &H75372C9
  m_sBox(1, 27) = &H80991B7B
  m_sBox(2, 27) = &H25D479D8
  m_sBox(3, 27) = &HF6E8DEF7
  m_sBox(0, 28) = &HE3FE501A
  m_sBox(1, 28) = &HB6794C3B
  m_sBox(2, 28) = &H976CE0BD
  m_sBox(3, 28) = &H4C006BA
  m_sBox(0, 29) = &HC1A94FB6
  m_sBox(1, 29) = &H409F60C4
  m_sBox(2, 29) = &H5E5C9EC2
  m_sBox(3, 29) = &H196A2463
  m_sBox(0, 30) = &H68FB6FAF
  m_sBox(1, 30) = &H3E6C53B5
  m_sBox(2, 30) = &H1339B2EB
  m_sBox(3, 30) = &H3B52EC6F
  m_sBox(0, 31) = &H6DFC511F
  m_sBox(1, 31) = &H9B30952C
  m_sBox(2, 31) = &HCC814544
  m_sBox(3, 31) = &HAF5EBD09
  m_sBox(0, 32) = &HBEE3D004
  m_sBox(1, 32) = &HDE334AFD
  m_sBox(2, 32) = &H660F2807
  m_sBox(3, 32) = &H192E4BB3
  m_sBox(0, 33) = &HC0CBA857
  m_sBox(1, 33) = &H45C8740F
  m_sBox(2, 33) = &HD20B5F39
  m_sBox(3, 33) = &HB9D3FBDB
  m_sBox(0, 34) = &H5579C0BD
  m_sBox(1, 34) = &H1A60320A
  m_sBox(2, 34) = &HD6A100C6
  m_sBox(3, 34) = &H402C7279
  m_sBox(0, 35) = &H679F25FE
  m_sBox(1, 35) = &HFB1FA3CC
  m_sBox(2, 35) = &H8EA5E9F8
  m_sBox(3, 35) = &HDB3222F8
  m_sBox(0, 36) = &H3C7516DF
  m_sBox(1, 36) = &HFD616B15
  m_sBox(2, 36) = &H2F501EC8
  m_sBox(3, 36) = &HAD0552AB
  m_sBox(0, 37) = &H323DB5FA
  m_sBox(1, 37) = &HFD238760
  m_sBox(2, 37) = &H53317B48
  m_sBox(3, 37) = &H3E00DF82
  m_sBox(0, 38) = &H9E5C57BB
  m_sBox(1, 38) = &HCA6F8CA0
  m_sBox(2, 38) = &H1A87562E
  m_sBox(3, 38) = &HDF1769DB
  m_sBox(0, 39) = &HD542A8F6
  m_sBox(1, 39) = &H287EFFC3
  m_sBox(2, 39) = &HAC6732C6
  m_sBox(3, 39) = &H8C4F5573
  m_sBox(0, 40) = &H695B27B0
  m_sBox(1, 40) = &HBBCA58C8
  m_sBox(2, 40) = &HE1FFA35D
  m_sBox(3, 40) = &HB8F011A0
  m_sBox(0, 41) = &H10FA3D98
  m_sBox(1, 41) = &HFD2183B8
  m_sBox(2, 41) = &H4AFCB56C
  m_sBox(3, 41) = &H2DD1D35B
  m_sBox(0, 42) = &H9A53E479
  m_sBox(1, 42) = &HB6F84565
  m_sBox(2, 42) = &HD28E49BC
  m_sBox(3, 42) = &H4BFB9790
  m_sBox(0, 43) = &HE1DDF2DA
  m_sBox(1, 43) = &HA4CB7E33
  m_sBox(2, 43) = &H62FB1341
  m_sBox(3, 43) = &HCEE4C6E8
  m_sBox(0, 44) = &HEF20CADA
  m_sBox(1, 44) = &H36774C01
  m_sBox(2, 44) = &HD07E9EFE
  m_sBox(3, 44) = &H2BF11FB4
  m_sBox(0, 45) = &H95DBDA4D
  m_sBox(1, 45) = &HAE909198
  m_sBox(2, 45) = &HEAAD8E71
  m_sBox(3, 45) = &H6B93D5A0
  m_sBox(0, 46) = &HD08ED1D0
  m_sBox(1, 46) = &HAFC725E0
  m_sBox(2, 46) = &H8E3C5B2F
  m_sBox(3, 46) = &H8E7594B7
  m_sBox(0, 47) = &H8FF6E2FB
  m_sBox(1, 47) = &HF2122B64
  m_sBox(2, 47) = &H8888B812
  m_sBox(3, 47) = &H900DF01C
  m_sBox(0, 48) = &H4FAD5EA0
  m_sBox(1, 48) = &H688FC31C
  m_sBox(2, 48) = &HD1CFF191
  m_sBox(3, 48) = &HB3A8C1AD
  m_sBox(0, 49) = &H2F2F2218
  m_sBox(1, 49) = &HBE0E1777
  m_sBox(2, 49) = &HEA752DFE
  m_sBox(3, 49) = &H8B021FA1
  m_sBox(0, 50) = &HE5A0CC0F
  m_sBox(1, 50) = &HB56F74E8
  m_sBox(2, 50) = &H18ACF3D6
  m_sBox(3, 50) = &HCE89E299
  m_sBox(0, 51) = &HB4A84FE0
  m_sBox(1, 51) = &HFD13E0B7
  m_sBox(2, 51) = &H7CC43B81
  m_sBox(3, 51) = &HD2ADA8D9
  m_sBox(0, 52) = &H165FA266
  m_sBox(1, 52) = &H80957705
  m_sBox(2, 52) = &H93CC7314
  m_sBox(3, 52) = &H211A1477
  m_sBox(0, 53) = &HE6AD2065
  m_sBox(1, 53) = &H77B5FA86
  m_sBox(2, 53) = &HC75442F5
  m_sBox(3, 53) = &HFB9D35CF
  m_sBox(0, 54) = &HEBCDAF0C
  m_sBox(1, 54) = &H7B3E89A0
  m_sBox(2, 54) = &HD6411BD3
  m_sBox(3, 54) = &HAE1E7E49
  m_sBox(0, 55) = &H250E2D
  m_sBox(1, 55) = &H2071B35E
  m_sBox(2, 55) = &H226800BB
  m_sBox(3, 55) = &H57B8E0AF
  m_sBox(0, 56) = &H2464369B
  m_sBox(1, 56) = &HF009B91E
  m_sBox(2, 56) = &H5563911D
  m_sBox(3, 56) = &H59DFA6AA
  m_sBox(0, 57) = &H78C14389
  m_sBox(1, 57) = &HD95A537F
  m_sBox(2, 57) = &H207D5BA2
  m_sBox(3, 57) = &H2E5B9C5
  m_sBox(0, 58) = &H83260376
  m_sBox(1, 58) = &H6295CFA9
  m_sBox(2, 58) = &H11C81968
  m_sBox(3, 58) = &H4E734A41
  m_sBox(0, 59) = &HB3472DCA
  m_sBox(1, 59) = &H7B14A94A
  m_sBox(2, 59) = &H1B510052
  m_sBox(3, 59) = &H9A532915
  m_sBox(0, 60) = &HD60F573F
  m_sBox(1, 60) = &HBC9BC6E4
  m_sBox(2, 60) = &H2B60A476
  m_sBox(3, 60) = &H81E67400
  m_sBox(0, 61) = &H8BA6FB5
  m_sBox(1, 61) = &H571BE91F
  m_sBox(2, 61) = &HF296EC6B
  m_sBox(3, 61) = &H2A0DD915
  m_sBox(0, 62) = &HB6636521
  m_sBox(1, 62) = &HE7B9F9B6
  m_sBox(2, 62) = &HFF34052E
  m_sBox(3, 62) = &HC5855664
  m_sBox(0, 63) = &H53B02D5D
  m_sBox(1, 63) = &HA99F8FA1
  m_sBox(2, 63) = &H8BA4799
  m_sBox(3, 63) = &H6E85076A
  m_sBox(0, 64) = &H4B7A70E9
  m_sBox(1, 64) = &HB5B32944
  m_sBox(2, 64) = &HDB75092E
  m_sBox(3, 64) = &HC4192623
  m_sBox(0, 65) = &HAD6EA6B0
  m_sBox(1, 65) = &H49A7DF7D
  m_sBox(2, 65) = &H9CEE60B8
  m_sBox(3, 65) = &H8FEDB266
  m_sBox(0, 66) = &HECAA8C71
  m_sBox(1, 66) = &H699A17FF
  m_sBox(2, 66) = &H5664526C
  m_sBox(3, 66) = &HC2B19EE1
  m_sBox(0, 67) = &H193602A5
  m_sBox(1, 67) = &H75094C29
  m_sBox(2, 67) = &HA0591340
  m_sBox(3, 67) = &HE4183A3E
  m_sBox(0, 68) = &H3F54989A
  m_sBox(1, 68) = &H5B429D65
  m_sBox(2, 68) = &H6B8FE4D6
  m_sBox(3, 68) = &H99F73FD6
  m_sBox(0, 69) = &HA1D29C07
  m_sBox(1, 69) = &HEFE830F5
  m_sBox(2, 69) = &H4D2D38E6
  m_sBox(3, 69) = &HF0255DC1
  m_sBox(0, 70) = &H4CDD2086
  m_sBox(1, 70) = &H8470EB26
  m_sBox(2, 70) = &H6382E9C6
  m_sBox(3, 70) = &H21ECC5E
  m_sBox(0, 71) = &H9686B3F
  m_sBox(1, 71) = &H3EBAEFC9
  m_sBox(2, 71) = &H3C971814
  m_sBox(3, 71) = &H6B6A70A1
  m_sBox(0, 72) = &H687F3584
  m_sBox(1, 72) = &H52A0E286
  m_sBox(2, 72) = &HB79C5305
  m_sBox(3, 72) = &HAA500737
  m_sBox(0, 73) = &H3E07841C
  m_sBox(1, 73) = &H7FDEAE5C
  m_sBox(2, 73) = &H8E7D44EC
  m_sBox(3, 73) = &H5716F2B8
  m_sBox(0, 74) = &HB03ADA37
  m_sBox(1, 74) = &HF0500C0D
  m_sBox(2, 74) = &HF01C1F04
  m_sBox(3, 74) = &H200B3FF
  m_sBox(0, 75) = &HAE0CF51A
  m_sBox(1, 75) = &H3CB574B2
  m_sBox(2, 75) = &H25837A58
  m_sBox(3, 75) = &HDC0921BD
  m_sBox(0, 76) = &HD19113F9
  m_sBox(1, 76) = &H7CA92FF6
  m_sBox(2, 76) = &H94324773
  m_sBox(3, 76) = &H22F54701

[1] [2] 下一页

  • 上一篇:

  • 下一篇:
  • 【字体: 】【打印此文】【关闭窗口
      相关文章:(只显示最新16条)
    VB.Net获取随机密码的实例
    VB.Net用Salt哈希数据的实例
    用DPAPI加密和解密数据的实例
    储存加密的数据库连接字符串到注册表的实例
    Salt加密数据的.Net实例
    Rijndael加密解密的实例
    AES加密的实例
    Rijndael加密的实例
    SHA256 Hash加密的实例
    VB.Net对XML元素进行加密解密的实例
    VB.Net文件CRC32算法的实例
    VB.Net文件SHA1算法的实例
    Rijndael类的实例
    TripleDES加解密的实例
    VB.Net实现des加密算法的实例
    VB.Net实现RSA加密的实例

    | 设为首页 | 加入收藏 | 联系站长 | | 友情链接 | 版权申明 |
    乐博网欢迎各种媒体转载我们的原创作品[转载请注明出处];我们鼓励更多VB.Net开发者一起加入研究与探讨;如发现文章访问错误、内容错误或版权疑问、内容有违相关法律(如涉及政治、色情、反动或散布虚假有害信息)等情况,请及时向我们举报,我们将及时纠正!
    联系邮箱:Shiny#vip.qq.com (#替换为@) QQ交流群: 40797788 [闽ICP备05014267号]