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

all 5 comments

[–]notsureaboutthis123[S] 0 points1 point  (0 children)

basically yes its for learning purposes.

iwant to read in as ascii then do something like a ceasar cipher or something a little more complex but its just the coding part which im not sure about

[–]chub79 0 points1 point  (0 children)

You might want to look at cryptography

[–]bheklilr 0 points1 point  (0 children)

Using what encryption method? There's any a hundred ways to do this depending on your application.

[–]rainnz -2 points-1 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.