473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to encrypt/decrypt pdf files programmatically?

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

Jan 15 '07 #1
2 6990
You can use something like this

http://msdn2.microsoft.com/en-us/lib...eprovider.aspx

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

"Martin Eckart" <mo******@yahoo.de.nospamwrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
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

Jan 15 '07 #2
Great idea! Works perfectly!

Thanks Aidy,
Martin
"Aidy" <ai**@noemail.xxxa.comwrote in message
news:hL******************************@bt.com...
You can use something like this

http://msdn2.microsoft.com/en-us/lib...eprovider.aspx

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

"Martin Eckart" <mo******@yahoo.de.nospamwrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
>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

Jan 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Benoît | last post by:
Hi, I have generated two keys : "C:>openssl req -nodes -new -x509 -keyout ben.key -out ben.crt -days 3650" I try to encrypt/decrypt a string like "JOHN" with these asymetrics keys. With the...
2
by: Anilza Popat | last post by:
I would like to know how to encrypt and decrypt files using c#. I want a program that asks for password before encrypt or decrypt the file. best regards
1
by: Jens Süßmeyer | last post by:
Hello, we want to build a solution to receive mails with encrypted content (XML-Files,etc). A Service will collect these mail from one Inbox, will decrypt the attachment and store them in a SQL...
0
by: Aaron | last post by:
Is the native Encrypt/Decrypt functionality with .NET PGP compatible?
3
by: David Cho | last post by:
I am still struggling with this. Used the PrintDocument class, but it was printing gobblygook. Does not recognize the PDF files as Acrobat files and just prints text. Can't get the shell...
4
by: Hrvoje Voda | last post by:
Does anyone knows a good example of how to encrypt/decrypt a string? Hrcko
7
by: Jean Christophe Avard | last post by:
Hi! I am designing an application wich comes with image file. These images are copyrighted and they have to be accessible only from within the application. At first, I tought I was going to store...
2
bferguson94
by: bferguson94 | last post by:
Design a program that allows the user to encrypt or decrypt a file. This means you will need to ask the user the direction to shift (left or right) and the number of places to shift (should they...
2
by: Rich Howard | last post by:
I'm working on an application that works as a remote client for integrating with corporate services. It's packaged as a downloadable Windows installer, allowing a user to install it and then...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.