const crypto = require('crypto'); 먼저 모듈을 불러오자. const password = '돼지' 먼저 password를 무찌로 해주고 console.log('해시화된 비밀번호:', crypto.createHash('sha512').update(password).digest('base64')) 이렇게 치면 해시화된 무찌가 나온다. 이렇게 짜잔 하고 나와준다. 여기서 sha512는 아직 취약점이 발견안되서 잘 쓰인다. base64는 인코딩 방식이다. 이외에 hex, latin1이 있다. # 소금을 쳐보자. crypto.randomBytes(12, (err, txt) => { const salt = txt.toString("base64"); console.log(salt); cryp..