Web Hacking Study/웹해킹

해시(md5) 적용하기

silver surfer 2022. 4. 11.

회원가입 사이트에서 처음 가입을 할 때 md5($str) 알고리즘으로 비밀번호를 저장한다.

근데 이 방식은 보안성이 낮다고한다....

 

signupdb.php

md5 알고리즘으로 저장된 문자열은 항상 같은 방식으로 암호화된다.

 

logindb.php

hello라는 사용자로 회원가입을 했을 때 입력한 비밀번호가 암호화되었다.

 

로그인 성공

 

** 참고 링크

https://www.w3schools.com/php/func_string_md5.asp

 

PHP md5() Function

W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

www.w3schools.com

 

댓글