1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

simple file encryption library

Discussion in 'C' started by akaash19, Feb 10, 2010.

  1. akaash19

    akaash19 New Member

    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
  2. Gene Poole

    Gene Poole New Member

    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)?
  3. akaash19

    akaash19 New Member

    THanks for the reply,
    security is not primary concern.First i need a library.
    I need to use encryption code in linux environment.
  4. Gene Poole

    Gene Poole New Member

    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:


Share This Page