Click here to Skip to main content
15,907,000 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionvbscript do not work on windows 2003. Pin
buffering839-Apr-13 22:18
buffering839-Apr-13 22:18 
AnswerRe: vbscript do not work on windows 2003. Pin
Garth J Lancaster9-Apr-13 22:39
professionalGarth J Lancaster9-Apr-13 22:39 
GeneralRe: vbscript do not work on windows 2003. Pin
dusty_dex10-Apr-13 2:09
dusty_dex10-Apr-13 2:09 
AnswerRe: vbscript do not work on windows 2003. Pin
dusty_dex10-Apr-13 2:12
dusty_dex10-Apr-13 2:12 
QuestionScroll panel automatically to the node selected in a treeview. Pin
VishwaKL9-Apr-13 18:29
VishwaKL9-Apr-13 18:29 
AnswerRe: Scroll panel automatically to the node selected in a treeview. Pin
VishwaKL9-Apr-13 22:21
VishwaKL9-Apr-13 22:21 
QuestionIssues with show popup when paging in mvc Pin
tuannguyenf49-Apr-13 8:14
tuannguyenf49-Apr-13 8:14 
Questionhow to decrypt password? Pin
Jassim Rahma9-Apr-13 4:11
Jassim Rahma9-Apr-13 4:11 
Hi,

I am using the following code to encrypt password with salt. I want to know can I decrypt so I can verify if the password is correct or it knowing that I am storing the passwords in MySQL,.

C#
public enum HashMethods
{
    SHA512            
}

private static string HashSHA512Managed(string saltedPassword)
{
    UnicodeEncoding uniEncode = new UnicodeEncoding();
    SHA512Managed sha = new SHA512Managed();
    byte[] bytePassword = uniEncode.GetBytes(saltedPassword);
    byte[] hash = sha.ComputeHash(bytePassword);
    return Convert.ToBase64String(hash);
}

public static string EncryptPassword(string password, string passwordSalt, HashMethods method)
{
    string siteWideSalt = Guid.NewGuid().ToString();
    string encryptedPassword;
    switch (method)
    {
        case HashMethods.SHA512:
            encryptedPassword = HashSHA512Managed(siteWideSalt + password + passwordSalt);
            break;
        default:
            encryptedPassword = HashSHA512Managed(siteWideSalt + password + passwordSalt);
            break;
    }

    return encryptedPassword;
}



Technology News @ www.JassimRahma.com

AnswerRe: how to decrypt password? Pin
Richard Deeming9-Apr-13 4:27
mveRichard Deeming9-Apr-13 4:27 
GeneralRe: how to decrypt password? Pin
R. Giskard Reventlov9-Apr-13 8:51
R. Giskard Reventlov9-Apr-13 8:51 
GeneralRe: how to decrypt password? Pin
Jassim Rahma11-Apr-13 0:02
Jassim Rahma11-Apr-13 0:02 
Questionmvc3 razor Pin
pooja_verma9-Apr-13 2:07
pooja_verma9-Apr-13 2:07 
AnswerRe: mvc3 razor Pin
Necmettin Demir13-Apr-13 3:41
Necmettin Demir13-Apr-13 3:41 
QuestionHow to ReturnURL? Pin
Jassim Rahma9-Apr-13 1:53
Jassim Rahma9-Apr-13 1:53 
AnswerRe: How to ReturnURL? Pin
AmitGajjar10-Apr-13 1:15
professionalAmitGajjar10-Apr-13 1:15 
GeneralRe: How to ReturnURL? Pin
Jassim Rahma10-Apr-13 3:06
Jassim Rahma10-Apr-13 3:06 
GeneralRe: How to ReturnURL? Pin
AmitGajjar10-Apr-13 3:10
professionalAmitGajjar10-Apr-13 3:10 
QuestionQuestion of the day post on a web page Pin
Member 87742808-Apr-13 20:25
Member 87742808-Apr-13 20:25 
QuestionDoes Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Steve Holdorf8-Apr-13 12:04
Steve Holdorf8-Apr-13 12:04 
AnswerRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
jkirkerx8-Apr-13 12:38
professionaljkirkerx8-Apr-13 12:38 
GeneralRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Jasmine25018-Apr-13 12:56
Jasmine25018-Apr-13 12:56 
GeneralMessage Closed Pin
8-Apr-13 13:14
professionaljkirkerx8-Apr-13 13:14 
GeneralRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Jasmine25019-Apr-13 5:55
Jasmine25019-Apr-13 5:55 
QuestionA potentially dangerous Request.Form value was detected from the client Pin
Member 98570608-Apr-13 11:18
Member 98570608-Apr-13 11:18 
AnswerRe: A potentially dangerous Request.Form value was detected from the client Pin
jkirkerx8-Apr-13 12:46
professionaljkirkerx8-Apr-13 12:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.