Encrypt your code using the Oracle Wrap tool

Source: Internet
Author: User
Tags chr reserved
oracle| encryption
Encrypt your code using the Oracle Wrap tool

Last Updated:monday, 2004-11-15 22:31 eygle






Oracle provides wrap tools that can be used to encrypt your package and so on.
However, it should be noted that the encrypted code can not be decrypted, you need to take care of your source code.

Here's an example:

1. Source Code

Create or Replace function Get_rowid (L_rowid in varchar2) return Varchar2isls_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; /



2. Code function test



[Oracle@jumper tools]$ sqlplus scott/tigersql*plus:release 9.2.0.4.0-production on Mon Nov 2004Copyright 21:56:36 (c ) 1982, 2002, Oracle Corporation. All rights reserved. Connected to:oracle9i Enterprise Edition release 9.2.0.4.0-productionwith the partitioning optionjserver release 9.2.0.4 .0-productionsql> @f_get_rowidFunction created. Sql> Select rowID from dept where deptno=10; ROWID------------------aaabipaabaaafrsaaasql> Select Get_rowid (' Aaabipaabaaafrsaaa ') from dual; Get_rowid (' aaabipaabaaafrsaaa ')------------------------------------------------------------------object# is : 6287relative_fno is:1block number Is:21586row number is:0sql>! [Oracle@jumper tools]$ lsct.sql ddlt.sql f_get_rowid.sql getevent.sql

3. Using wrap encryption and encryption code



[Oracle@jumper tools]$ Wrap Iname=f_get_rowid.sql oname=f_get_rowid.plbpl/sql wrapper:release on Mon Nov 21:59:39 2004Copyright (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 rep Lace function Get_rowid wrapped 0abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd389200000140 172: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 are::: 1Row number is::: 0008320 A0 8d 8f A0 B0 3d B4:2 A0 2c 6a A3 A0 A5 1c81 b0 A3 A0 1c Bayi B0 A3A0 1c BAYI B0 A3 A0 1c 81B0 A3 A0 1c bayi B0 A3 a01c Bayi B0:2 A0 6b:6 A0 A5 57a0 6e 7e:2 a0 A5 b B4 2e7e A0 a5 b4 7e6e 2e b4 7e:2 2e A0 A5 b42e B A0 7e A5 Wuyi b4 b 2e7e B4 6e 7e:2 2e a0 a5 Bb4 2e 7e A0 Wuyi b b42e 7e 6e b4 2e 7e:2 A0 A5B B4 2e d:2 A0, B7 a4b1 B5 4f 1d 8320 3 7 1f 1e 2b 1b30 (3c) 408d 4b4c 9CA4 A9 C1 b0 b4 BC DDCC d0 D8 c8 e4 E8 ebef f3 F7 FB ff 10910d 112 11d 11e 119 120 1211 129 12d 130 131 134 13913c 147 152 14a 14e 153155 156 15b 15e 162 165 166 168169 16e 171 176 177 17c 17f 18 3187 188 18a 18b 190 193 197 19a19b 19d 19e 1a3 1a6 1ab 1ac 1b11b4 1b8 1bc 1bd 1bf 1c0 1c5 1c91cd 1d1 1d5 1d7 1db 1dd 1e9 1ed1ef 1f0 1f9 8320 1 a 2 d:2 2:2 1 8:3 1 e 16:2 e:2 1:3 d:2 1:3 10:2 1:3 f:2 1:3 f:2 1:3 d 12:2 D 18 20 2 b 55:3 2 2e:2 26:2 3c3e 42:2 3e:2 one 3:2 1618 20:2 18:2 2d 2f 33:2 2f:2 11 36 3:2 11 1 6 20:2 18:2 2d 2f 33:2 2f:2 11 36 3:2 11 16 18 20:2 18:2 11:2 2 92:9 1 8,340: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 ef:2 d:5 f:2 d:5 f:2 d f 10:2 d:5 10:3 d:3 11:2 b:7 1 1fb4:3 0 1:3 0 2:a 0 7e 1:7 05: 2 0 3 4:3 0 3:7 0 54:3 0 5:3 04:3 0 7 7e 2 A:2 0 B 4:3 0 7:2 0 7 d f:6 0 07c 0 6:6 0f 0 d9:3 0 1 4:7 017 0 7c0 8:6 0 9:3 0 19:7 0 1c1a 0 7c 0a:6 0 c80 one 9:3 01e:7 0 1f0 7c 0 b:6 0 9:3 0 23:7 0 07c 0 c:6 0e:3 0 9:3 028:7 0 2b 290 7c 0 d:6 0 f:3 0 2c2d 0 3:3 08:3 0 a:3 0b:3 0 c:3 0d:3 0 2e35:2 0 7a 6:3 0 10:4 0 11:2 0 12:3 0 a:3 0 1c 3a 3C1E 3e:3 011:2 0 13:3 014:2 0 21 4143 23 40 45:3 0 11:2 0 15:4 0 26 47 49:3 11:2 0 12:3 0 b:3 0 294c 4e 2b 4b50:3 0 11:2 013:3 0 14:2 02e 3052 57:3 0 11:2 0 16:4 0 3359 5b:3 0 11:2 0 12:3 0 C:3 0 5d 5e 6038 62:3 011:2 0 13:3 014:2 0 3b 6567 3d 69:3 0 11:2 0 17:4 0 6b 6d:3 0 11:2 0 12:3 0 D:3 0 4370 6f74:3 0 750 7a 5:3 06:3 0 78:2 07a 7d:3 07d 4c 7d 7c7a 7b:6 0 7e:2 0 2 a 7d81:3 0 7e82 : 8 0 534:3 0 1 3 1 E 1c 1 118 1 1d 122 1 62f 3233 1 3b2 2 3d 2 3f 442 14d 54 4a 4f1 2 5156 2 5A1 5f 2 5c61 1 66 263 2 6a6c 1 26e 3 3676 1b 6 1116 252a 140 810114180 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 1 022 1 0 1c 1 013 1 027 1 018 1 01d 1 00/

4. Test the encrypted code



[Oracle@jumper tools]$ exitexitsql> drop function Get_rowid; Function dropped. Sql> @f_get_rowid. Plbfunction created. Sql> Select Get_rowid (' Aaabipaabaaafrsaaa ') from dual; Get_rowid (' aaabipaabaaafrsaaa ')-----------------------------------------------------------------object# is : 6287relative_fno is:1block number Is:21586row number is:0sql>







The author of this article:
Eygle,oracle technology concern, from China's largest Oracle technology forum Itpub.
Www.eygle.com is the author's personal site. You can contact the author by Guoqiang.Gai@gmail.com. Welcome technical discussions and exchange of links.

Original source:

Http://www.eygle.com/faq/Use.Wrap.to.Encryption.You.Code.htm




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.