- Home
·
- Encryption
·
- A high level encryption algorithm! the bigger the key ppl, the more secure your data will be!
A high level encryption algorithm! the bigger the key ppl, the more secure your data will be!
A high level encryption algorithm! the bigger the key ppl, the more secure your data will be!
API Declarations
'Text2 = Crypt(Text1, "secret_key_goes_here")
'To decrypt, do it exactly the same, but use the encrypted data as the Input string.
Rate A high level encryption algorithm! the bigger the key ppl, the more secure your data will be!
(2(2 Vote))
Dim Sbox(0 To 255) As Long
Dim Sbox2(0 To 255) As Long
Dim j As Long, i As Long, t As Double
Dim K As Long, temp As Long, Outp As String
For i = 0 To 255
Sbox(i) = i
Next i
j = 1
For i = 0 To 255
If j > Len(Key) Then j = 1
Sbox2(i) = Asc(Mid(Key, j, 1))
j = j + 1
Next i
j = 0
For i = 0 To 255
j = (j + Sbox(i) + Sbox2(i)) Mod 256
temp = Sbox(i)
Sbox(i) = Sbox(j)
Sbox(j) = temp
Next i
i = 0
j = 0
For X = 1 To Len(inp)
i = (i + 1) Mod 256
j = (j + Sbox(i)) Mod 256
temp = Sbox(i)
Sbox(i) = Sbox(j)
Sbox(j) = temp
t = (Sbox(i) + Sbox(j)) Mod 256
K = Sbox(t)
Outp = Outp + Chr(Asc(Mid(inp, X, 1)) Xor K)
Next X
Crypt = Outp
End Function
A high level encryption algorithm! the bigger the key ppl, the more secure your data will be! Comments
No comments yet — be the first to post one!
Post a Comment