West Wind Internet and Client Tools
Encrypt string in config file???
Gravatar is a globally recognized avatar based on your email address. Encrypt string in config file???
  Matt Slay
  Rick Strahl
  Apr 22, 2015 @ 08:23am
Rick - now that I am using the XML file to store app config info for my client desktop app, I need to encrypt the username and password of the Sql Server connection string that I am storing there. Sadly, this file will be wide-open for reading by any nosey user who could find it, so I'd like to encrypt a few of the strings in there, but I'll need to decrypt after I load the values from the XML file.

So, are there any West Wind classes that will encrypt/decrypt? I don't need anything super-secure that could resist the FBI or anything, just a causal snoopy user on my local network.

I guess I could hard-code these values into my app and go that route, but I'm trying to have a solution that would not required recompiling if things change around in the future.

Gravatar is a globally recognized avatar based on your email address. Re: Encrypt string in config file???
  Rick Strahl
  Matt Slay
  Apr 22, 2015 @ 10:55am

Nope no function for encryption.

You could use wwDotNetBridge and Westwind.Utilities.dll which includes a few encryption functions. Hashes and two way encryption.

https://west-wind.com/WestWindWebToolkit/docs/?page=_3o20x2om7.htm

These are the functions I use in .NET. For encryption EncryptString/DecrytString would be the ones you want.

This class might be a good candidate to add to wwDotnetBridge internally I suppose :-)

+++ Rick ---



Rick - now that I am using the XML file to store app config info for my client desktop app, I need to encrypt the username and password of the Sql Server connection string that I am storing there. Sadly, this file will be wide-open for reading by any nosey user who could find it, so I'd like to encrypt a few of the strings in there, but I'll need to decrypt after I load the values from the XML file.

So, are there any West Wind classes that will encrypt/decrypt? I don't need anything super-secure that could resist the FBI or anything, just a causal snoopy user on my local network.

I guess I could hard-code these values into my app and go that route, but I'm trying to have a solution that would not required recompiling if things change around in the future.




Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Encrypt string in config file???
  Rick Strahl
  Rick Strahl
  Apr 22, 2015 @ 06:23pm
I've created a new wwEncryption class that uses wwDotnetBridge to handle a number of encryption scenarios. You can do one-way hashes (typically used for password, token and validation encryption) as well as two-way hashes (typically used for encrypting configuration data that has to be read back).

The encryption functions are now part of the wwDotnetBridge.dll (in the commercial versions in Web Connection and West Wind Client Tools). It'll ship first with Web Connection hopefully today or tomorrow then with the Client Tools in a week or so.

Here's the documentation:
wcdocs:_4c10w1prc.htm

+++ Rick ---

Nope no function for encryption.

You could use wwDotNetBridge and Westwind.Utilities.dll which includes a few encryption functions. Hashes and two way encryption.

https://west-wind.com/WestWindWebToolkit/docs/?page=_3o20x2om7.htm

These are the functions I use in .NET. For encryption EncryptString/DecrytString would be the ones you want.

This class might be a good candidate to add to wwDotnetBridge internally I suppose :-)

+++ Rick ---



Rick - now that I am using the XML file to store app config info for my client desktop app, I need to encrypt the username and password of the Sql Server connection string that I am storing there. Sadly, this file will be wide-open for reading by any nosey user who could find it, so I'd like to encrypt a few of the strings in there, but I'll need to decrypt after I load the values from the XML file.

So, are there any West Wind classes that will encrypt/decrypt? I don't need anything super-secure that could resist the FBI or anything, just a causal snoopy user on my local network.

I guess I could hard-code these values into my app and go that route, but I'm trying to have a solution that would not required recompiling if things change around in the future.




© 1996-2024