Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   simple file encryption library (http://www.go4expert.com/forums/simple-file-encryption-library-t20928/)

akaash19 10Feb2010 13:50

simple file encryption library
Hello Friends,
I need simple file encryption library to encrypt files with symmetric key and decrypt them.
I went through open ssl and its too confusing.I just need simple library to perform just file encrypt and decrypt.
I am new in C, just done programming in java/php before.

Thanks all

Gene Poole 10Feb2010 19:58

Re: simple file encryption library
For simplicity of code and understanding, I'd go with a simple stream cipher like RC4. What are your requirements? How secure does it need to be? Is it to be platform independent (Windows has had a cryptoAPI for some time now which makes things much easier)?

akaash19 12Feb2010 13:41

Re: simple file encryption library
THanks for the reply,
security is not primary concern.First i need a library.
I need to use encryption code in linux environment.

Gene Poole 12Feb2010 20:27

Re: simple file encryption library
Well, RC4 is very simple to code in C. It's a stream cipher so once it is initialized, just grab a byte one at a time and XOR it with your plaintext.

There's a complete example here:


All times are GMT +5.5. The time now is 22:12.