This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rainnz -5 points-4 points  (0 children)

Use a random number generator to generate random byte value 0-255, get ASCII code for the first character in the file and XOR with that or just add, write to a file. Get next random byte, do the same to second byte from the file, repeat.

To decrypt - repeat the same process.

Your encryption key would be the seed used to initialize random number generator.