使用Oracle Wrap工具加密你的代码
Oracle提供Wrap工具,可以用于加密你的Package等.
不过需要注意的是,加密后的代码无法解密,你需要保管好你的源代码。
以下是个例子:
1.源代码
create or replace function get_rowid
(l_rowid in varchar2)
return varchar2
is
ls_my_rowid varchar2(200);
rowid_type number;
object_number number;
relative_fno number;
block_number number;
row_number number;
begin
dbms_rowid.rowid_info(l_rowid,rowid_type,object_number,relative_fno, block_number, row_number);
ls_my_rowid := 'Object# is :'||to_char(object_number)||chr(10)||
'Relative_fno is :'||to_char(relative_fno)||chr(10)||
'Block number is :'||to_char(block_number)||chr(10)||
'Row number is :'||to_char(row_number);
return ls_my_rowid ;
end;
/
2.代码功能测试
[oracle@jumper tools]$ sqlplus scott/tiger SQL*Plus: Release 9.2.0.4.0 - Production on Mon Nov 15 21:56:36 2004 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production SQL> @f_get_rowid Function created. SQL> select rowid from dept where deptno=10; ROWID
------------------
AAABiPAABAAAFRSAAA SQL> select get_rowid('AAABiPAABAAAFRSAAA') from dual; GET_ROWID('AAABIPAABAAAFRSAAA')
------------------------------------------------------------------
Object# is :6287
Relative_fno is :1
Block number is :21586
Row number is :0 SQL> !
[oracle@jumper tools]$ ls
ct.sql ddlt.sql f_get_rowid.sql getevent.sql
3.使用wrap加密及加密后的代码
[oracle@jumper tools]$ wrap iname=f_get_rowid.sql oname=f_get_rowid.plb PL/SQL Wrapper: Release 9.2.0.4.0- Production on Mon Nov 15 21:59:39 2004 Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved. Processing f_get_rowid.sql to f_get_rowid.plb [oracle@jumper tools]$ cat f_get_rowid.plb
create or replace function get_rowid wrapped
0
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
3
8
9200000
1
4
0
17
2 :e:
1FUNCTION:
1GET_ROWID:
1L_ROWID:
1VARCHAR2:
1RETURN:
1LS_MY_ROWID:
1200:
1ROWID_TYPE:
1NUMBER:
1OBJECT_NUMBER:
1RELATIVE_FNO:
1BLOCK_NUMBER:
1ROW_NUMBER:
1DBMS_ROWID:
1ROWID_INFO:
1Object# is :::
1||:
1TO_CHAR:
1CHR:
110:
1Relative_fno is :::
1Block number is :::
1Row number is :::
0 0
0
83
2
0 a0 8d 8f a0 b0 3d b4
:2 a0 2c 6a a3 a0 51 a5 1c
81 b0 a3 a0 1c 81 b0 a3
a0 1c 81 b0 a3 a0 1c 81
b0 a3 a0 1c 81 b0 a3 a0
1c 81 b0 :2 a0 6b :6 a0 a5 57
a0 6e 7e :2 a0 a5 b b4 2e
7e a0 51 a5 b b4 2e 7e
6e b4 2e 7e :2 a0 a5 b b4
2e 7e a0 51 a5 b b4 2e
7e 6e b4 2e 7e :2 a0 a5 b
b4 2e 7e a0 51 a5 b b4
2e 7e 6e b4 2e 7e :2 a0 a5
b b4 2e d :2 a0 65 b7 a4
b1 11 68 4f 1d 17 b5
83
2
0 3 7 23 1f 1e 2b 1b
30 34 38 3c 59 44 48 4b
4c 54 43 75 64 68 70 40
8d 7c 80 88 63 a9 98 9c
a4 60 c1 b0 b4 bc 97 dd
cc d0 d8 94 c8 e4 e8 eb
ef f3 f7 fb ff 103 104 109
10d 112 115 119 11d 11e 120 121
126 129 12d 130 131 133 134 139
13c 141 142 147 14a 14e 152 153
155 156 15b 15e 162 165 166 168
169 16e 171 176 177 17c 17f 183
187 188 18a 18b 190 193 197 19a
19b 19d 19e 1a3 1a6 1ab 1ac 1b1
1b4 1b8 1bc 1bd 1bf 1c0 1c5 1c9
1cd 1d1 1d5 1d7 1db 1dd 1e9 1ed
1ef 1f0 1f9
83
2
0 1 a 2 d :2 2 :2 1 8
:3 1 e 17 16 :2 e :2 1 :3 d :2 1
:3 10 :2 1 :3 f :2 1 :3 f :2 1 :3 d 1
2 :2 d 18 20 2b 39 47 55
:3 2 11 24 26 2e :2 26 :2 11 3c
3e 42 :2 3e :2 11 45 3 :2 11 16
18 20 :2 18 :2 11 2d 2f 33 :2 2f
:2 11 36 3 :2 11 16 18 20 :2 18
:2 11 2d 2f 33 :2 2f :2 11 36 3
:2 11 16 18 20 :2 18 :2 11 :2 2 9
2 :9 1
83
4
0 :2 1 :5 2 :2 3
:2 1 :7 5 :5 6 :5 7
:5 8 :5 9 :5 a :b c
:11 d e :2 d :5 e
:2 d :5 e :2 d e
f :2 d :5 f :2 d
:5 f :2 d f 10
:2 d :5 10 :3 d :3 11
:2 b :7 1
1fb
4
:3 0 1 :3 0 2
:a 0 7e 1 :7 0
5 :2 0 3 4
:3 0 3 :7 0 5
4 :3 0 5 :3 0
4 :3 0 7 9
0 7e 2 a
:2 0 b 60 0
9 4 :3 0 7
:2 0 7 d f
:6 0 12 10 0
7c 0 6 :6 0
f 94 0 d
9 :3 0 14 :7 0
17 15 0 7c
0 8 :6 0 9
:3 0 19 :7 0 1c
1a 0 7c 0
a :6 0 13 c8
0 11 9 :3 0
1e :7 0 21 1f
0 7c 0 b
:6 0 9 :3 0 23
:7 0 26 24 0
7c 0 c :6 0
e :3 0 9 :3 0
28 :7 0 2b 29
0 7c 0 d
:6 0 f :3 0 2c
2d 0 3 :3 0
8 :3 0 a :3 0
b :3 0 c :3 0
d :3 0 15 2e
35 :2 0 7a 6
:3 0 10 :4 0 11
:2 0 12 :3 0 a
:3 0 1c 3a 3c
1e 39 3e :3 0
11 :2 0 13 :3 0
14 :2 0 21 41
43 23 40 45
:3 0 11 :2 0 15
:4 0 26 47 49
:3 0 11 :2 0 12
:3 0 b :3 0 29
4c 4e 2b 4b
50 :3 0 11 :2 0
13 :3 0 14 :2 0
2e 53 55 30
52 57 :3 0 11
:2 0 16 :4 0 33
59 5b :3 0 11
:2 0 12 :3 0 c
:3 0 36 5e 60
38 5d 62 :3 0
11 :2 0 13 :3 0
14 :2 0 3b 65
67 3d 64 69
:3 0 11 :2 0 17
:4 0 40 6b 6d
:3 0 11 :2 0 12
:3 0 d :3 0 43
70 72 45 6f
74 :3 0 37 75
0 7a 5 :3 0
6 :3 0 78 :2 0
7a 48 7d :3 0
7d 4c 7d 7c
7a 7b :6 0 7e
:2 0 2 a 7d
81 :3 0 80 7e
82 :8 0
53
4
:3 0 1 3 1
6 1 e 1
c 1 13 1
18 1 1d 1
22 1 27 6
2f 30 31 32
33 34 1 3b
2 38 3d 1
42 2 3f 44
2 46 48 1
4d 2 4a 4f
1 54 2 51
56 2 58 5a
1 5f 2 5c
61 1 66 2
63 68 2 6a
6c 1 71 2
6e 73 3 36
76 79 6 11
16 1b 20 25
2a
1
4
0
81
0
1
14
1
8
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0
3 1 0
22 1 0
2 0 1
c 1 0
13 1 0
27 1 0
18 1 0
1d 1 0
0 /
4.测试加密后的代码
[oracle@jumper tools]$ exit
exit SQL> drop function get_rowid; Function dropped. SQL> @f_get_rowid.plb Function created. SQL> select get_rowid('AAABiPAABAAAFRSAAA') from dual; GET_ROWID('AAABIPAABAAAFRSAAA')
-----------------------------------------------------------------
Object# is :6287
Relative_fno is :1
Block number is :21586
Row number is :0 SQL>
注意,如果出现如下错误:
kgepop: no error frame. to pop to for error 1801
则需要设置正确的环境变量:NLS_LANG
例如在WIndows下可以如下设置:
C:\oracle\ora92\bin>set NLS_LANG=CHINESE_CHINA.ZHS16GBK
使用Oracle Wrap工具加密你的代码的更多相关文章
- Oracle wrap 和 unwrap( 加密与解密) 说明
一. Wrap 说明 官网的说明如下: A PL/SQL Source Text Wrapping http://download.oracle.com/docs/cd/E11882_01/appde ...
- 使用mybatis-generator工具自动生成mybatis代码
使用mybatis-generator工具自动生成mybatis代码 步骤如下: 1.引入maven 依赖,在项目pom.xml文件中添加 <plugin> <groupId> ...
- 查看加密的vba代码
查看加密的vba代码,可以使用这个工具,excel文件里面的宏代码一览无余. https://files.cnblogs.com/files/laoxia/PVP.zip
- Oracle诊断工具 - ORA-4030 Troubleshooting Tool
ORA-4030 说明Oracle服务器进程(server process)无法在操作系统(OS)上分配到足够的内存. 导致ORA-4030 的主要原因有: -物理内存不足 -OS kernel/ ...
- Oracle SQL Developer,Oracle 开发工具之toad、SQL Developer、PL/SQL Developer等比较
参考: oracle 的几个开发工具比较 因Oracle几乎是中大型商业企业数据的首选,所以比较一下常用与Oracle的工具. Oracle SQL Developer 免费,一般开发使用足矣,常用. ...
- Oracle客户端工具出现“Cannot access NLS data files or invalid environment specified”错误的解决办法
Oracle客户端工具出现"Cannot access NLS data files or invalid environment specified"错误的解决办法 方法一:参考 ...
- 电脑上不安装Oracle时,C# 调用oracle数据库,Oracle客户工具
Oracle的安装包通常都比较大,安装又比较费时,而且如果安装过程中不幸出错,各种蛋疼,即便是安装过N遍的老手,有时候安装起来也觉得挺烦.而工作中,通常服务器上面安装oracle就可以了,我们本地电脑 ...
- 客户视角:Oracle ETL工具ODI
客户视角:Oracle ETL工具ODI 数据集成已成为企业在追求市场份额中的关键技术组件,与依靠手工编码的方式不同,越来越多的企业选择完整的数据集成解决方案来支持其IT战略,从大数据分析到云平台的集 ...
- oracle tkprof 工具详解
oracle tkprof 工具详解 今天是2013-09-26,进行tkprof工具使用学习,在此记录一下笔记: 一)查看需要跟踪会话信息: select s.sid,s.serial#,s.us ...
随机推荐
- NSIS:超级轻量皮肤SkinH
原文 NSIS:超级轻量皮肤SkinH 这虽然是一个其他软件的皮肤控件,不过拿来用到NSIS上还是不错的.控件加皮肤文件只有100多K,可以说是比较难得了! 看一下效果: 代码示例: 01 #皮肤 ...
- Intelli idea 常用快捷键汇总
To navigate to the implementation(s) of an abstract method, position the caret at its usage or its n ...
- ajaxfileupload.js插件结合一般处理文件实现Ajax无刷新上传
先上几张图更直观展示一下要实现的功能.本功能主要通过Jquery ajaxfileupload.js插件结合ajaxUpFile.ashx一般应用程序处理文件实现Ajax无刷新上传功能,结合NPOI2 ...
- cocos2d-x教程2:在windows下怎样批量转换pvr,ccz为png或jpg
这是一个非经常见的功能,可是找了全网,竟然找不到,于是借鉴别人的批处理文件,改了下,就能够把整个文件夹的所有一次批量转换. 将这个bat文件暂定为,myConvert.bat,运行时就把这个bat文件 ...
- Android 定义自己的学习(5)它们的定义Progressbar
它们的定义View最后的研究,首先在效果图. watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxNDE2MzcyNg==/font/5a6L5L2T/f ...
- c语言获取符号位整数和浮点
1. 为什么你应该得到的签位 非常多的时间,我们需要推断的数目值正和负,做了相应的逻辑处理.完成这一要求条件推断语句可以很好. 有时会出现以下情况, if (x > 0) { x = x - 1 ...
- PHP第六课 使用方法数组
学习要点: *使用主阵列功能的理解 *知道如何遍历 *了解超全局数组和使用的基本关系 数组 1.数组定义和遍历 2.数组函数 数组定义: $arr=array(1,2,3);//索引数组,下标全是数字 ...
- Swift中文教程(六)--枚举和结构
原文:Swift中文教程(六)--枚举和结构 Enumerations 枚举 使用 enum 来创建一个枚举.跟Classes(类)和其他类型的命名方式一样,枚举也可以有Method(方法). enu ...
- MySQL检查连接的最大数量和改变的最大连接数
版权声明:本文博主原创文章.博客,未经同意不得转载.
- WebBrowser一点心得,如果在Javascript和Winform代码之间实现双向通信
原文:WebBrowser一点心得,如果在Javascript和Winform代码之间实现双向通信 最近工作需要,学习了一下winform内嵌webbrowser控件,然后与htm页面中的javasc ...