How to encrypt/decrypt pdf files programmatically?

Discussion in 'ASP .Net' started by Martin Eckart, Jan 15, 2007.

  1. Hello,

    I have an asp.net 1.1 application which is opening .pdf files and shows them
    to users. The .pdf files are sitting on a file share and they need to be
    encrypted. Encryption requirement is not that high, if it would be .net 2.0
    it would be ok to use System.IO.File.Encrypt. But since it is 1.1 I am
    little bit lost.

    Is there a way to use any symmetric algorithm like Rijndael for that? As far
    as I understand those methods are only useful if you have a string to
    encrypt?

    Thanks very much, higly appreciated!

    Martin
    Martin Eckart, Jan 15, 2007
    #1
    1. Advertising

  2. Martin Eckart

    Aidy Guest

    You can use something like this

    http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rc2cryptoserviceprovider.aspx

    Update the code to get the bytes from your file rather than a string.

    "Martin Eckart" <> wrote in message
    news:...
    > Hello,
    >
    > I have an asp.net 1.1 application which is opening .pdf files and shows
    > them to users. The .pdf files are sitting on a file share and they need to
    > be encrypted. Encryption requirement is not that high, if it would be .net
    > 2.0 it would be ok to use System.IO.File.Encrypt. But since it is 1.1 I am
    > little bit lost.
    >
    > Is there a way to use any symmetric algorithm like Rijndael for that? As
    > far as I understand those methods are only useful if you have a string to
    > encrypt?
    >
    > Thanks very much, higly appreciated!
    >
    > Martin
    Aidy, Jan 15, 2007
    #2
    1. Advertising

  3. Great idea! Works perfectly!

    Thanks Aidy,
    Martin


    "Aidy" <> wrote in message
    news:...
    > You can use something like this
    >
    > http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rc2cryptoserviceprovider.aspx
    >
    > Update the code to get the bytes from your file rather than a string.
    >
    > "Martin Eckart" <> wrote in message
    > news:...
    >> Hello,
    >>
    >> I have an asp.net 1.1 application which is opening .pdf files and shows
    >> them to users. The .pdf files are sitting on a file share and they need
    >> to be encrypted. Encryption requirement is not that high, if it would be
    >> .net 2.0 it would be ok to use System.IO.File.Encrypt. But since it is
    >> 1.1 I am little bit lost.
    >>
    >> Is there a way to use any symmetric algorithm like Rijndael for that? As
    >> far as I understand those methods are only useful if you have a string to
    >> encrypt?
    >>
    >> Thanks very much, higly appreciated!
    >>
    >> Martin

    >
    >
    Martin Eckart, Jan 16, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    489
    Jonathan Allen
    Sep 25, 2004
  2. Mark

    Encrypt/decrypt info from form

    Mark, Feb 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,505
    William LaMartin
    Feb 6, 2004
  3. =?Utf-8?B?TWlrZQ==?=
    Replies:
    0
    Views:
    953
    =?Utf-8?B?TWlrZQ==?=
    Aug 31, 2005
  4. Microsoft

    Password encrypt/decrypt

    Microsoft, Oct 5, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    7,555
    =?Utf-8?B?c3Jpbmk=?=
    Oct 5, 2005
  5. Replies:
    1
    Views:
    431
    Daniel Martin
    Jun 16, 2007
Loading...

Share This Page