Well, if rand() does give the same random letters for the same speeds, how do u get completely random letters?
Well, if rand() does give the same random letters for the same speeds, how do u get completely random letters?
You can not make completely random letters, you can always calculate the next number (although it might be hard). Computers can only produce pseudo-random (spelling?) numbers.
As shakti said it is impossible for a program to generate completely random output.
The only way to truly generate random numbers on a computer is to use specialized hardware which is not common by any means. (one of the lecturers at my uni has a quantum random number generator that can be installed as a pci card )
Look up the srand() function. It seeds the inbuilt random number generator. With the same seed value, rand() will produce the same sequence every time, using srand() with the current date and time say, will generate a different pseudo-random sequence.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
The decryption process needs to be able to undo the encryption in order for the entire process to be meaningful. If you don't like the idea of non-random placement of message char in the file as suggested by siegfriedmcwild, then you will need to encode a mechanism as to how to find the embedded message char if they are randomly placed in the file. One approach might be to keep track of where in the encrypted file you can find the desired char. The encrypted file could then contain the number of char in the message, the location of the embedded char of the message, and the encrypted message itself (where the message char are "randomly" placed). Of course, you would want to encrypt the administrative data in a non-random fashion so you can decrypt it before using it to decrypt the randomly embedded message, but it adds another couple levels of subterfuge the intrepid intruder needs to overcome.