Originally posted by j0nas
You sure talk encrypted I'am having trouble decrypting your written language.

If your question was: Is the standard C's pseudo random generator (PRG) algorithm ok for cryptography, the answer is NO !!!

A few strange things with your scheme:
1. What type is your 'c' variable?
2. Why genereate a value between 0 and 12000?
3. srand()/rand() is probably implemented differently on different compilers or versions of compilers. This is a problem if you for instance re-build your app with a different or newer compiler and then want to decrypt old files.
4. Where is the encryption/decryption key???
5. The entropy of rand() it very low (maybe as low as 15 bits), thus very unsecure PRG for cryptography

If your program is running on Windows, use the MS Crypto API. It is not hard to use and there are several samples out on the net on how to use it.

If the data you're protecting isn't that sensitive, you may "invent" and use your own encryption scheme... but think twice before doing it...

Good luck.

hey jonas.. soli for my so so late reply.. hahaha.. well, coz of probs logging in my reply last yr.. so, i forget abt tt..
hee.. i get wat u mean.. haHAHA. well, nvm abt tt.. coz, we used simple xor encryption with password needed in e end..

anywae thx for ur help.. [if u can see this]