
VB
DotNet灵魂
知而达智 智而达远
展开
-
经典加密算法在VB中的实现(1)- Base64
Public key(1 To 3) As Long Private Const base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst uvwxyz0123456789+/" Public Sub GenKey() Dim d As Long, phi As Long, e As Long Dim m As Long, x As Long转载 2008-04-14 13:04:00 · 1011 阅读 · 1 评论 -
经典加密算法在VB中的实现(2)- MD5
Option Explicit Dim w1 As String, w2 As String, w3 As String, w4 As String Function MD5F(ByVal tempstr As String, ByVal w As String, ByVal X As S tring, ByVal y As String, ByVal z As String, ByVal Xin转载 2008-04-14 13:06:00 · 751 阅读 · 0 评论 -
经典加密算法在VB中的实现(3)- RC4
Public Sub main() Dim key As String For i = 1 To 16 Randomize key = key & Chr(Rnd * 255) Next i MsgBox RC4(RC4("Welcome To Plindge Studio!", key), key) End Sub Public Function RC4(inp As Strin转载 2008-04-14 13:09:00 · 805 阅读 · 0 评论 -
经典加密算法在VB中的实现(4)- DES
一、算法实现(转自绿色兵团) 1. 处理密钥: 1.1 从用户处获得64位密钥.(每第8位为校验位,为使密钥有正确的奇偶校验,每 个密钥要有奇 数个”1”位.(本文如未特指,均指二进制位) 1.2 具体过程: 1.2.1 对密钥实施变换,使得变换以后的密钥的各个位与原密钥位对应关系如 下表所示: 表一为忽略校验位以后情况 1 2转载 2008-04-14 13:15:00 · 829 阅读 · 0 评论