lopahn2 / nodeJS_Study

nodejs 공부
1 stars 0 forks source link

MYSQL #11

Open lopahn2 opened 2 years ago

lopahn2 commented 2 years ago

구름에서 시작하기 & 비밀번호

https://blog.naver.com/PostView.nhn?blogId=icarus8050&logNo=221404122266&from=search&redirect=Log&widgetTypeCall=true&directAccess=false

비밀번호 : 군대에서 맨날 쓰는 그거.

lopahn2 commented 2 years ago

암호화


const crypto = require('crypto');

const pw = 'password';

const hash = {
  md5_base64 : crypto.createHash('md5').update(pw).digest('base64'),
  md5_hex : crypto.createHash('md5').update(pw).digest('hex'),

  sha256_base64 : crypto.createHash('sha256').update(pw).digest('base64'),
  sha256_hex : crypto.createHash('sha256').update(pw).digest('hex'),

  sha512_base64 : crypto.createHash('sha512').update(pw).digest('base64'),
  sha512_hex : crypto.createHash('sha512').update(pw).digest('hex')
  }

let key = Object.keys(hash);
for (key in hash) {
  console.log(`${key} \t : \t ${hash[key]}`);
}
lopahn2 commented 2 years ago

sql 한글 인코딩 변경법

ALTER TABLE user CONVERT TO CHARACTER SET utf8;
lopahn2 commented 2 years ago

varchar type의 최대 크기

https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=reinstate10&logNo=130174614599 21,845 byte 란다.