snippet library logo
Boxedart - Worlds Largest Development Center
in category
Visual Basic / Encryption / Easy String Encryption
Snippet details
ID: 5
Viewed: 1362
Added: 2001-11-21
Version:

User Rated at:
Rate This:
Snippets in this catagory         
Show Printable Version
Easy String Encryption Using A Password There are many algorithms available for string encryption and decryption, but often they become complicated due to the need to ensure that the ASCII value of an encrypted character stays within the limits of a single byte (0-255). An elegant approach is to use the XOR function. The simple subroutine below will always give results falling within the 0-255 limit. It also has the advantage that a second call will reverse the encryption automatically. One thing you should be aware of is that the encrypted string may contain Chr$(0) values. While this will not be a problem with Visual Basic strings, other Windows objects treat Chr$(0) as an end-of-string character. Use of the encrypted string with a Text Box or in API calls may produce unexpected results.

General Details
Snippet uploaded by: snippet
Email : webmaster@snippetlibrary.com
Snippet By: Unknown

Snippet By:    Unknown
Declarations
Highlight All
Code
Highlight All




No Reviews to show


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Subject:

Reviewed By:

Write a review:





Terms of Conditions
Powered By
Avian Hosting
© 2005 snippetlibrary.com All Rights Reserved.