bcrypt & jwt

๊น€ํ•œ์ค€ยท2021๋…„ 7์›” 9์ผ
0

๐Ÿš€ ๋น„๋ฐ€๋ฒˆํ˜ธ ์•”ํ˜ธํ™”

๐Ÿ”ฅ ์•”ํ˜ธํ™”์‹œ ๋ฐ˜๋“œ์‹œ bytesํ™”
bycrypt๋Š” str๋ฐ์ดํ„ฐ๊ฐ€ ์•„๋‹Œ Bytes๋ฐ์ดํ„ฐ๋ฅผ ์•”ํ˜ธํ™”

๐Ÿ“ encode: ย  str -> bytes
๐Ÿ“ decode: ย  bytes -> str
**๋ฌธ์ž๊ทœ๊ฒฉ = 'utf-8'

ํด๋ž˜์Šค ํƒ€์ž…์€ ๋‹น์—ฐํžˆ bytes

๋น„๋ฐ€๋ฒˆํ˜ธ ์•”ํ˜ธํ™” ์ž‘์—… ํ™•์ธ

bcrypt.checkpw()
(์ž…๋ ฅ๋ฐ›์€ ํŒจ์Šค์›Œ๋“œ, ์ €์žฅ๋œ ์•”ํ˜ธํ™” ํŒจ์Šค์›Œ๋“œ) ์ˆœ์„œ
๋‘˜ ๋‹ค ํƒ€์ž…์€ Bytes

0๊ฐœ์˜ ๋Œ“๊ธ€