Re: simple string encryption

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

If the encryption/decryption process creates any non-displayable characters,
then the results upon display in a texbox (and use of that text as a source)
will be unacceptable. So, if you want to use this process, what I'd suggest
that you do is to convert each encrypted character to the HEX string
equivalent for display, then when using the displayed data for the reverse
process, loop through that data (two characters at a time) and convert it
back to the ASCII string equivalent.

If this isn't enough of a hint, let me know, and I'll post a simple example.

BTW, if you don't ever display the results and only use strings for the
encrypted and decrypted data, then there shouldn't be a problem.

***

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.


.


Quantcast