Version 20180904

This commit is contained in:
2018-09-08 22:59:18 +02:00
parent d74444b027
commit e92be16b24
838 changed files with 395696 additions and 0 deletions

34
CryptoEditor/Crypto.vb Normal file
View File

@@ -0,0 +1,34 @@
Module Crypto
Public Function EncryptText(ByVal strText As String, ByVal strPwd As String)
Dim i As Integer, c As Integer
Dim strBuff As String
strPwd = UCase$(strPwd)
If Len(strPwd) Then
For i = 1 To Len(strText)
c = Asc(Mid$(strText, i, 1))
c = c + Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
strBuff = strBuff & Chr(c And &HFF)
Next i
Else
strBuff = strText
End If
EncryptText = strBuff
End Function
Public Function DecryptText(ByVal strText As String, ByVal strPwd As String)
Dim i As Integer, c As Integer
Dim strBuff As String
strPwd = UCase$(strPwd)
If Len(strPwd) Then
For i = 1 To Len(strText)
c = Asc(Mid$(strText, i, 1))
c = c - Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
strBuff = strBuff & Chr(c And &HFF)
Next i
Else
strBuff = strText
End If
DecryptText = strBuff
End Function
End Module