SQLPROMPT5.3对各种加密对象的解密测试

SQLPROMPT5.3对各种加密对象的解密测试

测试环境:

SQL2005个人开发者版 SP4

SQLPROMPT版本:5.3.8.2


视图

1 CREATE VIEW aa
2 WITH ENCRYPTION
3 AS
4 SELECT * FROM [dbo].[Users]

可以解密


存储过程

1 CREATE PROCEDURE bb
2 WITH ENCRYPTION
3 AS
4 SELECT * FROM [dbo].[Users]

可以解密


触发器

1 CREATE TRIGGER cc
2 ON [dbo].[Users]
3 WITH ENCRYPTION
4 FOR INSERT
5 AS RAISERROR(500001,16,10)

触发器不能手动调用的,所以不能解密


函数

 1 USE [pratice]
 2 GO
 3 CREATE FUNCTION [dbo].f_get_page(@page_num BINARY(6))
 4 RETURNS VARCHAR(11)
 5 WITH ENCRYPTION
 6 AS
 7 BEGIN
 8 RETURN(CONVERT(VARCHAR(2),(CONVERT(INT,SUBSTRING(@page_num,6,1))*POWER(2,8))+
 9         (CONVERT(INT,SUBSTRING(@page_num,5,1))))+':'+
10         CONVERT(VARCHAR(11),
11         (CONVERT(INT,SUBSTRING(@page_num,4,1))*POWER(2,24))+
12         (CONVERT(INT,SUBSTRING(@page_num,3,1))*POWER(2,16))+
13         (CONVERT(INT,SUBSTRING(@page_num,2,1))*POWER(2,8))+
14         (CONVERT(INT,SUBSTRING(@page_num,1,1)))))
15 END

 

 

可以解密


如有不对的地方,欢迎大家拍砖o(∩_∩)o

posted @ 2013-11-06 20:03  桦仔  阅读(3148)  评论(1编辑  收藏  举报