Re: Encryption

From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 01/01/05


Date: Sat, 1 Jan 2005 13:34:48 +0100


"Nitin" <loginitin@yahoo.com> schrieb:
> My program encryptes text using filestream and DES and stores the
> encrypted text in a text file. I want to encrypt any text and store it in
> access data base(I need the encrypted text as 'string') and not a text
> file. Can anyone help me?.

Instead of encrypting to a 'FileStream', you can encrypt to a 'MemoryStream'
and then put the data in a database field as a BLOB:

HOW TO: Read and Write a File to and from a BLOB Column by Using ADO.NET and
Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;316887>

HOW TO: Read and Write a File to and from a BLOB Column by Using Chunking in
ADO.NET and Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;317034>

-- 
 M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
 V B   <URL:http://dotnet.mvps.org/dotnet/faqs/> 


Relevant Pages

  • Re: Where to store the DB password in a asp.net app?
    ... you'd be fairly safe in the ... Use the ASP.NET Utility to Encrypt Credentials and Session State ... Basically i am curious as to where everyone stores there database details ... or registry? ...
    (microsoft.public.dotnet.framework.aspnet)
  • NEWBIE Question: Encrypting a file via an application
    ... I am writing a linux application that stores application ... configuration/data in files that I wish to encrypt. ... and then store them safely to be used to unencrypt files? ...
    (sci.crypt)
  • Re: Encrypting Field in Database
    ... Refer to the Encryption section in the following FAQ: ... >I have existing application that we need to encrypt the field that stores ... >the user password. ... >that stores userid and passwords. ...
    (microsoft.public.sqlserver.security)
  • Encrypting streams
    ... I have been trying to encrypt and decrypt a filestream. ... public string EncryptFile(string rawFile, string encFile, string key, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Encryption
    ... I want to encrypt any text and store it in ... >> access data baseand not a text ... Read and Write a File to and from a BLOB Column by Using Chunking ...
    (microsoft.public.dotnet.languages.vb)