473,799 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

encrypting images in asp.net

I wonder if it is possible to encrypt images(like .tiff or .gif files) in
asp.net? How? Any exampel code or url will be appreciated. Thanks
Nov 19 '05 #1
5 1655
It's possible to encrypt any data. However, I can't for the life of me
figure out why you would want to do this. If, for example, you're looking
for a way to prevent images from being copied, forget it. Can't be done. If
it could, we wouldn't need copyright laws!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"viktor9990 " <vi********@dis cussions.micros oft.com> wrote in message
news:3F******** *************** ***********@mic rosoft.com...
I wonder if it is possible to encrypt images(like .tiff or .gif files) in
asp.net? How? Any exampel code or url will be appreciated. Thanks

Nov 19 '05 #2
The .tiff files ( which represent scanned agreement) will be saved in an sql
database 2000 of security reasons. My client demand that these files will be
encrypted also. It would be helpful if you know of any exampel code or url
about that. Thanks
"Kevin Spencer" wrote:
It's possible to encrypt any data. However, I can't for the life of me
figure out why you would want to do this. If, for example, you're looking
for a way to prevent images from being copied, forget it. Can't be done. If
it could, we wouldn't need copyright laws!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"viktor9990 " <vi********@dis cussions.micros oft.com> wrote in message
news:3F******** *************** ***********@mic rosoft.com...
I wonder if it is possible to encrypt images(like .tiff or .gif files) in
asp.net? How? Any exampel code or url will be appreciated. Thanks


Nov 19 '05 #3
> The .tiff files ( which represent scanned agreement) will be saved in
an sql database 2000 of security reasons. My client demand that these
files will be encrypted also. It would be helpful if you know of any
exampel code or url about that. Thanks


Well once you start to do encryption if you ever want the original data you'll
need to do decryption. So this means you need a key. Where does your client
want you to store the key? This is a major problem when people (client typically)
say "oh, just encrypt it" and they don't understand what it all means.

So to help, what's the usage of the images? Meaning they're encrypted in
the DB, when do you pull them out? Who gets to see them and how? Are they
going to be served from an ASP.NET application or do only certain people
get to see them via an intranet application? If we know the scenario a bit
better then you might get some better guidance... This security stuff is
tricky.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #4
These images are going to be served from an ASP.NET application. Certain
people will be able to look at them (depending on their role/persmissions).
What I only need now is how to encrypt these images when uplaoding them to
sql server 2000 database and how to decrypt them when showing them to
entitled users?

"Brock Allen" wrote:
The .tiff files ( which represent scanned agreement) will be saved in
an sql database 2000 of security reasons. My client demand that these
files will be encrypted also. It would be helpful if you know of any
exampel code or url about that. Thanks


Well once you start to do encryption if you ever want the original data you'll
need to do decryption. So this means you need a key. Where does your client
want you to store the key? This is a major problem when people (client typically)
say "oh, just encrypt it" and they don't understand what it all means.

So to help, what's the usage of the images? Meaning they're encrypted in
the DB, when do you pull them out? Who gets to see them and how? Are they
going to be served from an ASP.NET application or do only certain people
get to see them via an intranet application? If we know the scenario a bit
better then you might get some better guidance... This security stuff is
tricky.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #5
Here's the easiest way:

http://msdn.microsoft.com/library/de...SecNetHT07.asp

But be aware that you have a key management problem, meaning the key using
DPAPI is managed for your by the host OS and it will be different for each
machine, meaning this approach won't work on a server farm. I'd suggest you
go spend some time reading about the issues revolving around security. The
book I'd recommend is:

http://www.amazon.com/exec/obidos/tg...books&n=507846

And specifically section 2.6 entitled "Cryptograp hy Is Not the Solution".
Like I said, this security stuff is tricky business; Don't rush into something
without understanding how it works and why you're doing it.

-Brock
DevelopMentor
http://staff.develop.com/ballen
These images are going to be served from an ASP.NET application.
Certain people will be able to look at them (depending on their
role/persmissions). What I only need now is how to encrypt these
images when uplaoding them to sql server 2000 database and how to
decrypt them when showing them to entitled users?

"Brock Allen" wrote:
The .tiff files ( which represent scanned agreement) will be saved
in an sql database 2000 of security reasons. My client demand that
these files will be encrypted also. It would be helpful if you know
of any exampel code or url about that. Thanks

Well once you start to do encryption if you ever want the original
data you'll need to do decryption. So this means you need a key.
Where does your client want you to store the key? This is a major
problem when people (client typically) say "oh, just encrypt it" and
they don't understand what it all means.

So to help, what's the usage of the images? Meaning they're encrypted
in the DB, when do you pull them out? Who gets to see them and how?
Are they going to be served from an ASP.NET application or do only
certain people get to see them via an intranet application? If we
know the scenario a bit better then you might get some better
guidance... This security stuff is tricky.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #6

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

Similar topics

6
2091
by: Dayne | last post by:
Guys, I am writing a database application(vb.net , sql server) and is presently storing the connection settings in a xml file...not very secure though. What is a safer method in a dynamic environment? Dayne
9
3593
by: Dayne | last post by:
Guys, I am writing a database application(vb.net , sql server) and is presently storing the connection settings in a xml file...not very secure though. What is a safer method in a dynamic environment? Dayne
11
1950
by: frizzle | last post by:
Hi there, I need an encrypting function, but haven't got a clue where to start. First a string has to be encrypted with two different encryption keys. Both output should be anything a-z / A-Z / 0-9 with a fixed length (e.g. 20 chars). (Preferably the encryption keys should pick chars from a string i give them, to prevent l's and 1's, o's and 0's etc.)
2
2275
by: SeeSharp Bint | last post by:
Visual Studio 2005, dotnet, c#. Microsoft SQL Server. Windows XP forms application. Temporarily, for my database application, I have been storing the various elements of database connection items like datasource,password,userid as plain strings in the registry. I'd now like to make these secure against people reading them. I thought of encrypting/decrypting each string when i write to the registry but I wouldnt know where to find a...
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.