|
The answer mainly depends on the architecture of the application. Will it be used by many different users that aren't on the same network, or within a local Intranet? What resources will be available to your application to hold that data? You'll have to take those considerations into account in order to determine what is the best option for persisting the data. Regardless of your choice, you are going to need persistent storage of some format to hold the data. Whatever option you decide to go with make sure you store a hash of password values. Personally, I use the .NET MD5 implementation (MD5CryptoServiceProvider) to hash passwords, but the .NET Framework includes a number of hash algorithm implementations. In practice, you should persist the hash rather than the actual password and when authenticating, you take the hash of whatever the user enters and compare it against the hash that was persisted; if it matches then they entered the correct password. It's not mathematically possible to get the original value from a hash. If you need to secure other data you can use some of the other .NET Cryptography classes to encrypt the data. Either way a number of Symmetric encryption algorithms (aka Secret Key) are included in the .NET framework (the .NET Rijndael implementation is what I usually use). You'll generally need to create your own binary Key and Initialization Vector (IV, for short and commonly referred to as the 'Salt'). The Key and IV lengths vary somewhat for the different algorithms so you'll need to read up on that as you decide on an encryption scheme that works for you. Symmetric encryption requires the same Key and IV be used for decryption as was used to encrypt the data, so it's common to choose a Key and IV for your application that are pretty much static. If you need more flexibility than that you can look into the Asymmetric encryption (aka Public key/Private key) but those generally require more complexity, however there are certainly situations that call for it.
Keep It Simple Stupid! (KISS)
|
|
|
|
|
Hi,
I am trying to display an email in the WebBrowser control.
Althoug it is displaying the body of the email correctly it doesn't display the additional information
like the sender info (From, To, Subject etc).
How can I manipulate the browser to add these information? (as it is available in the .eml file)?
Can I set additonal information in the WebBrowser.Document?
Many thanks!
|
|
|
|
|
A browser is not meant to display .eml files, but to display .htm.
You'll have to extract this information yourself, and display accordingly.
I are troll
|
|
|
|
|
Thanks for the information.
Do you know where I can find information on how to extract the information?
What do I use?
Thank you!
|
|
|
|
|
Open the email-file (*.eml) with Notepad. The method of extraction is a matter of taste, I'd go for the RegExes.
I are troll
|
|
|
|
|
Thank you!
|
|
|
|
|
How to centre a datarowview column heather?
thanks
|
|
|
|
|
do you mean center the text of the 'header' at the top of the of the grid view?
|
|
|
|
|
if so then:
dataGridView1.Columns[0].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
|
|
|
Ohh, yes, excuse me about the mistake. Thank you very much
|
|
|
|
|
What have you tried?
Maybe a code snippet from you will help us to point you in the right direction.
Otherwise try google.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
ArielR wrote: How to centre a datarowview column heather?
That's wonderful!
Welcome in the CP's members memorable quotes. [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
JA!, Thank you for the postulation, ..have hard fingers...
|
|
|
|
|
Didn't know that C# can be used to get heat too
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
lol maybe 'Datagridview' are an electrical appliance company and he stumbled on this forum while looking for tips on the layout of his house funiture
|
|
|
|
|
I have a binding to a datatable and want to return values from the columns for position zero without changing the binding position to do it.
How can i do this please?
|
|
|
|
|
simple, mydataset.mydatatable[0].mycolumnName....
|
|
|
|
|
|
I want to format a DateTime value into a string. The thing is that I’m developing a Multilanguage application and I want to format the string according to the users culture.
For example:
Swedish: YYYY:MM:DD HH:mm
English: DD/MM/YYYY HH:mm
_____________________________
...and justice for all
|
|
|
|
|
I believe there's a ToString method that uses the local culture, or that takes the culture at least, so you can ask the system for it ).
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
DateTime.ToString("g")
made it for me.
_____________________________
...and justice for all
|
|
|
|
|
|
string myDate = DateTime.Now.ToString("dd/MM/YYYY HH:mm");
Why was this post voted a 1?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Wednesday, January 21, 2009 1:35 PM
|
|
|
|
|
Yeah, what they said, but you should only use ISO 8601-compliant date formats: yyyy-MM-dd HH:mm
|
|
|
|
|
How to implement kerberos authentication in ASP.net..
%$^
|
|
|
|