๐ Reference
๐ Chapter
โฃ
์์
import crypto from 'crypto';
const hash = crypto.createHash('sha256').update('{์ํธํํ ๋ฌธ์ฅ}').digest('hex');
createHash(algorithm, options)
โsha256โ, โsha512โ ๋ฑ์ด ๋ํ์ ์ผ๋ก ์ฐ์ธ๋ค.update(data, inputEncoding)
digest(encoding)
โbase64โ, โhexโ, โlatin1โ ๊ณผ ๊ฐ์ ์ธ์ฝ๋ฉ๋ฐฉ์์ด ๋งค๊ฐ๋ณ์๋ก ๋ค์ด์จ๋ค.