TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajesh Gami
79
24.4k
1.3m
Create MD5 Password Encryption in MVC
Apr 4 2018 2:23 AM
How to generate MD5 Encrypted passeword in MVC.
i dont want to generate password like : 4DE53544234ADFFBB421ED60FFCFB835
here is my code:
MD5 md5 =
new
MD5CryptoServiceProvider();
//Byte[] originalBytes = ASCIIEncoding.Default.GetBytes(user.password);
Byte[] originalBytes = System.Text.Encoding.ASCII.GetBytes(user.password);
Byte[] encodedBytes = md5.ComputeHash(originalBytes);
user.password = BitConverter.ToString(encodedBytes);
StringBuilder user_password_main =
new
StringBuilder();
for
(
int
i = 0; i < encodedBytes.Length; i++)
{
user_password_main.Append(encodedBytes[i].ToString(
"X2"
));
}
above code OUTPUT is : 4DE53544234ADFFBB421ED60FFCFB835 but i dont want this type generate password.
i want to generate password like this:
$2y$40$yIei8lieo8hOvqAsERTzyeuU.g.0y6aaJagKGL.ZZYPr0oSdB.GDx
using MD5.
Reply
Answers (
2
)
creating controls in c#
C# how to put comma for a dicimal in textbox?????