Newbie stuck on encryption code C#

I have a method where I pass my userName "admin" and password "pass", but no matter what I try I can never get the ReturnString = new password.

 public void Authorize(string userName, string password) { //send the password to get Encrypted Encrypt(password); //How do I get the ReturnString = to new.password so I can verify encryption in the database? // after Encryption I'd like to compare it to db var query = from c in AuthContext.Passwords where (c.UserID == userName.ToLower() && c.Password == password) select c; 

Here's my Encrypt method.

 public string Encrypt(string NonEncrypt) { //Declare code that Encrypts ///This part works for me { // this is the Encrypted password I need. return ReturnString; // this is now ^289(342 } 

by nomjeremy via /r/csharp

Leave a Reply