Bit Manipulation in FoxPro for Data Encryption (98700)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft FoxPro for MS-DOS 2.0
- Microsoft FoxPro for MS-DOS 2.5
- Microsoft FoxPro for MS-DOS 2.5a
- Microsoft FoxPro for Windows 2.5
- Microsoft FoxPro for Windows 2.5a
This article was previously published under Q98700 SUMMARY
Because FoxPro uses characters that have values between 0 and 255 (1 byte),
these character values and thus the bit pattern can be manipulated once the
characters are converted to numeric values using the ASC() command. This
sort of operation could be used for data encryption.
The program below illustrates how the bit pattern of an entire string can
be swapped by rotating the bit patterns of each character one at a time and
placing the resulting characters in reverse order in the output string.
Modification Type: | Major | Last Reviewed: | 12/3/2003 |
---|
Keywords: | kbcode KB98700 |
---|
|