create
table
`tes***5`
(`id`
int(4)
notnull
,`name`
varchar(20
)not
null
,`pwd`
varchar(50
)not
null
,primary
key(
`id`))
engine
=innodb
default
charset
=utf8
插入一些資料
insert
into tes***5 values(1
,'zz'
,'123456'),
(2,'zangzang'
,'456789'
如果我們要對pwd這一列資料進行加密,語法是:
update tes***5 set pwd = md5(pwd)
;
如果單獨對某個使用者(如zz)的密碼加密
insert
into tes***5 values(3
,'zangz'
,'123456'
)update tes***5 set pwd = md5(pwd)
where name =
'kuangshenzangzang'
;
插入新的資料自動加密
insert
into tes***5 values(4
,'kuangshen3'
,md5(
'123456'))
;
查詢登入使用者資訊(md5對比使用,檢視使用者輸入加密後的密碼進行比對)
select
*from tes***5 where
`name`
='kuangshen'
and pwd=md5(
'123456'
);
資料庫級別的MD5加密
md5資訊摘要演算法 英語 md5 message digest algorithm 傳送門 md5不可逆 所以網上存在的那些md5破解是根據加密後的字元逐一比對加密表 自己建的 然後找到對應的密文,就把原文返回給你 create table ifnot exists tes 5 id int 4 ...
資料庫級別的MD5加密
什麼是md5 md5資訊摘要演算法 英語 md5 message digest algorithm 一種被廣泛使用的密碼雜湊函式,可以產生出乙個128位 16位元組 的雜湊值 hash value 用於確保資訊傳輸完整一致 測試資料庫md5加密 步驟1 建立測試表特是 5 create table ...
MD5資料加密小記
static nsstring token hjsdfklsa1234 加 令牌 令牌內容可自由發揮 nsstring mymd5 nsstring md5 return result property nonatomic,strong nsstring loginpwd 宣告加密口令 nsstri...