Encrypt1 + Decrypt1

Encrypts (and decrypts) a string. To decrypt an encrypted string, use the Decrypt Function.
Encrypt replaces each letter in a string with a different character, including spaces, and then reverses the scrambled string.
Encrypt provides good enough string encryption

CodeFunctionName
What is this?

Public

Tested

Imported
Private Function Decrypt1(ByVal encryptedstring)
Dim x, i, tmp
encryptedstring = StrReverse( encryptedstring )
For i = 1 To Len( encryptedstring )
x = Mid( encryptedstring, i, 1 )
tmp = tmp & Chr( Asc( x ) - 1 )
Next
Decrypt = tmp
End Function
Private Function Encrypt1(ByVal string)
Dim x, i, tmp
For i = 1 To Len( string )
x = Mid( string, i, 1 )
tmp = tmp & Chr( Asc( x ) + 1 )
Next
tmp = StrReverse( tmp )
Encrypt = tmp
End Function

encryptedstring
or
string

Views 4,710

Downloads 1,459

CodeID
DB ID