Re: Windows Regitry - Encryption Key storage

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Harman Sahni (HarmanSahni_at_Hotmail.com)
Date: 06/30/04


Date: Wed, 30 Jun 2004 16:06:15 -0400

Yeah I tried converting that into binary data but somehow the exact
indentation and spacing are not retained.

"Sunny" <sunnyask@icebergwireless.com> wrote in message
news:ONMXBktXEHA.3516@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> convert the string to byte array and use it. The SetValue method will
> create a binary registry key and will store all the data you need.
>
> Then you have to convert it back as well.
>
> Sunny
>
>
> In article <#2VpNGtXEHA.1888@TK2MSFTNGP10.phx.gbl>,
> HarmanSahni@Hotmail.com says...
> > Any volunteers?
> >
> >
> >
> > "Harman Sahni" <HarmanSahni@Hotmail.com> wrote in message
> > news:ujOL9OsXEHA.3644@TK2MSFTNGP12.phx.gbl...
> > > We have a public and private key pair for Credit Card data encryption.
> > > The database part is all done where we generated the key pair.
> > >
> > > Public key resides in the database for encryption and we intend to
store
> > the
> > > private key in the registry of Windows 2003 server from which our
> > > application will pass it to the stored proc to decrypt back the data.
> > >
> > > Problem is that when we use the "Multi-String" value in the registry
to
> > > store the private key which looks something like
> > >
> > > "----- BEGIN KEY
> > > fooo
> > > bar
> > > tar
> > > "
> > >
> > > we get the error "Data of type REG_MULTI_SZ cannot contain empty
strings,
> > > Registry editor will remove all empty strings found and hence it
messes up
> > > the Key format.
> > >
> > > Question: How can we store the key in the registry?
> > >
> > > Any help is appreciated!
> > >
> > > Rgds,
> > > -H
> > >
> > >
> >
> >
> >



Relevant Pages

  • Re: Useful class for binary data storate and manipulation
    ... > I'm trying to decide on a structure to store Message Data. ... > contains binary data of arbitrary format and length. ... > some sort of array of bytes containing whatever the message is. ... It has no functionality below the byte level, if you need to be able to set ...
    (comp.lang.java.help)
  • Re: Proper modularization technique
    ... will generate a string to be used by the calling routine. ... Should I set aside an array in the calling routine and have the ... the function might need to store more characters than the array ...
    (comp.lang.c)
  • Re: Data From CREATEOBJECT
    ... the first column and the "key" in the second. ... The array is public so that all of the objects can find it and the main program can find all of the objects. ... So there is no need to store it once more in the array. ... If it is a variable set of properties, then it might be better to build a long string of the property names and the respective values and store this string in a memo field. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: VB6 can do, C# can NOT do !!! Byte [] into string is invalid data
    ... store byte array into a string. ... the string will be returned to classic ASP, ... You shouldn't treat arbitrary binary data as text. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: what is the best datatype for..
    ... If you are only going to store it, then use a string. ... each value in the array, check to see if it already exists in the ... If it does, then just increment the count, otherwise, add ...
    (microsoft.public.dotnet.languages.csharp)