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

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 653 Downloads 251

'Encrypt', 'decrypt', 'asc', 'chr', 'replace', 'convert', 'change', 'substitute', 'protection', 'security', 'NotMyWork'

ANmarAmdeen
326
Attachments
Protection Classic ASP
Revisions

v1.0