¾È±Ô °øºÎ¹æ

MS-SQL > ¾Ïȣȭ/º¹È£È­ - EncryptByPassPhrase() / DecryptByPassPhrase()

µî·ÏÀÏ : 2017-07-03 19:48 Á¶È¸¼ö : 52,427

±âÁ¸¿¡ ±¸ÃàÇسõÀº DB¸¦ ¹ÙÅÁÀ¸·Î Å×À̺íÀÇ Çʵ带 ¾Ïȣȭ ÇÏ°íÀÚ ÇÒ¶§¸¦ ¿¹·Î µç´Ù.

Å×À̺í¸í : T_MEMBER
±âÁ¸ Çʵå¸í : F_PHONE
»õ·Î¿î Çʵå¸í : F_PHONE_TEMP

2. »õ·Î¿î Çʵ带 »ý¼ºÇÑ´Ù. ¿©±â¼­´Â F_PHONE_TEMP ¶ó´Â Æú´õ¸¦ »ý¼ºÇß´Ù.

3. ¾Ïȣȭ Äڵ尪Àº ´ÙÀ½Áß Çϳª¸¦ ¼±ÅÃÇϵµ·Ï ÇÑ´Ù.

MD2, MD4, MD5SHA, SHA1

¿©±â¼­´Â 'MD4'¸¦ »ç¿ëÇϵµ·Ï ÇÏ°Ú´Ù.

-- ¾Ïȣȭ
UPDATE T_MEMBER SET F_PHONE_TEMP = EncryptByPassPhrase('MD4',F_PHONE)


-- º¹È£È­ È®ÀÎ

Select F_PHONE, F_PHONE_TEMP, Convert(varchar(Max),DecryptByPassPhrase('MD4',F_PHONE_TEMP)) from T_MEMBER

4. F_PHONE ÇÊµå »èÁ¦ÇÏ°í F_PHONE_TEMP Çʵå¸íÀ» F_PHONE ·Î º¯°æ
 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.