Windows Live
VS Team System
Smart Device
Visual C#
Game Technologies
.NET Development
VS Express Editions
Architecture
Visual FoxPro
Visual Basic
Visual Studio
Windows Forms
Windows Vista
Microsoft ISV
SQL Server
Software Development Network>> Visual C#>> How to encrypt a string in C#
How to encrypt a string in C#
Hot Topic
GDI form transparency problem
Windows XP Home Edition - Desktop
SQL update command not working
Where is the C# API?
But customErrors-mode IS "Off"!!!
space in file path!
How to display image based on user input
ComboBox Question
Process & WaitForExit & OutputDataReceived
Get data from XML Auto
Visual C#
Use C++ Classes in C#
How to Display ASP.NET Template Contents in New Website dialog **
read INI file from c#
Wiered problem with AddColumn:
drawing on a panel
connection to MSDN library directly.
creation of a c# project File(.csproj) and Solution
Get the font filename (like tahoma.ttf)
inlude replacement in ASP.NET
SaveFileDialog
How to encrypt a string in C#
Specifically, I want the encrypted string to contain only numbers and letters (no special characters).
Thank you!
Answer this question
How to encrypt a string in C#
ragsrags
It's not encryption, but a way to get rid of special characters:
string
s = "Foo bar";
string
s1 = Convert.ToBase64String(Encoding.Unicode.GetBytes(s));
' And back...
string
s2 = Encoding.Unicode.GetString(Convert.FromBase64String(s1));
microsoft_developer
Veneta -
There is an encrypt method in System.Web.Security in the FormsAuthentication class.
http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfSystemWebSecurityFormsAuthenticationClassEncryptTopic.asp
You can also see another example here:
http://www.codeproject.com/dotnet/DotNetCrypto.asp
HTH,
Karen
How to encrypt a string in C#
Answer this question
How to encrypt a string in C#
ragsrags
string s = "Foo bar";
string s1 = Convert.ToBase64String(Encoding.Unicode.GetBytes(s));
' And back...
string s2 = Encoding.Unicode.GetString(Convert.FromBase64String(s1));
microsoft_developer
There is an encrypt method in System.Web.Security in the FormsAuthentication class. http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfSystemWebSecurityFormsAuthenticationClassEncryptTopic.asp
You can also see another example here:
http://www.codeproject.com/dotnet/DotNetCrypto.asp
HTH,
Karen