genzedu777 Posted January 2, 2011 Share Posted January 2, 2011 Hi, My understanding of 'SHA' command is to encrypt the password, however is there a way to decrypt the password after the encryption? Thanks $query = "INSERT INTO mismatch_user (username, password, join_date) VALUES ('$username', SHA('$password1'), NOW())"; Link to comment https://forums.phpfreaks.com/topic/223185-how-do-we-decrypt-password-which-are-encrypted/ Share on other sites More sharing options...
mmarif4u Posted January 2, 2011 Share Posted January 2, 2011 Nope Link to comment https://forums.phpfreaks.com/topic/223185-how-do-we-decrypt-password-which-are-encrypted/#findComment-1153814 Share on other sites More sharing options...
revraz Posted January 2, 2011 Share Posted January 2, 2011 SHA is not encryption, it's a hash. Link to comment https://forums.phpfreaks.com/topic/223185-how-do-we-decrypt-password-which-are-encrypted/#findComment-1153815 Share on other sites More sharing options...
mmarif4u Posted January 2, 2011 Share Posted January 2, 2011 SHA is not encryption, it's a hash. Another good point. Link to comment https://forums.phpfreaks.com/topic/223185-how-do-we-decrypt-password-which-are-encrypted/#findComment-1153816 Share on other sites More sharing options...
genzedu777 Posted January 2, 2011 Author Share Posted January 2, 2011 Hi all, Thanks for the kind advice. So if I would like to decrypt password, I would have to use 'decrypt' function code instead of 'hash' code? May I know what is the difference between decrypt and hash code? Thanks Link to comment https://forums.phpfreaks.com/topic/223185-how-do-we-decrypt-password-which-are-encrypted/#findComment-1153824 Share on other sites More sharing options...
trq Posted January 2, 2011 Share Posted January 2, 2011 One is secure (hash), the other isn't. Link to comment https://forums.phpfreaks.com/topic/223185-how-do-we-decrypt-password-which-are-encrypted/#findComment-1153827 Share on other sites More sharing options...
genzedu777 Posted January 2, 2011 Author Share Posted January 2, 2011 Thanks Link to comment https://forums.phpfreaks.com/topic/223185-how-do-we-decrypt-password-which-are-encrypted/#findComment-1153828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.