用MYSQL中的加密函数来加密:PASSWORD()
加密:<sql:update var="user" dataSource="${bookdev}">
insert into user values("","${param.userName}",password("${param.userPwd}"),"${param.userLevel}")
</sql:update>
解密:<sql:query var="query" dataSource="${bookdev}">
select * from user where userName='${param.userName}' and
userPwd=password('${param.userPwd}')
</sql:query>
insert into user values("","${param.userName}",password("${param.userPwd}"),"${param.userLevel}")
</sql:update>
解密:<sql:query var="query" dataSource="${bookdev}">
select * from user where userName='${param.userName}' and
userPwd=password('${param.userPwd}')
</sql:query>