Use Oracle wrap to encrypt SQL scripts

Source: Internet
Author: User

Tested how to use wrap to encrypt self-written SQL scripts

You can encrypt the processes, functions, packages, and other SQL scripts you write to prevent others from reading your code. This encryption method is irreversible and cannot be decrypted back to the original content after encryption.

Syntax: Wrap INAME =.../../some_ SQL. SQL oname =.../../some_ SQL .plb

Test:

[1] SQL script to be encrypted my. SQL

Create or replace package "sys". "mypack"

Procedure write (p_path in varchar2, p_filename in varchar2, p_lob in blob, ret_val out binary_integer );

End;

[2] bat that calls wrap for encryption:

Cd f:/Oracle/ora81/bin
Set nls_lang = american_america.usacii7 // set the character set. If the following error occurs
Wrap INAME = F:/work/code/My. SQL oname = F:/work/code/My. PLB
Pause

[3] My. PLB generated after encryption:

Create or replace package "sys". "mypack" wrapped
0
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
ABCD
3
9
8106000
1
4
0
B
2: e:
1 package:
1 mypack:
1 write:
1p_path:
1varchar2:
1p_filename:
1p_lob:
1 BLOB:
1ret_val:
1out:
1binary_integer:
0

0
0
1f
2
0 A0 1D 97 9A 8f A0 B0
3D 8f A0 B0 3D 8f A0 B0
3D 96: 2 A0 B0 54 B4 55 6a
: 2 AA 59 58 17 B5
1f
2
0 3 7 8 12 2B 27 26
33 40 3C 23 48 51 4D 3B
59 6a 62 66 38 71 61 76
7A 5E 7E 80 83 86 8f
1f
2
0: 2 1: 2 F 16 20: 2 16 2a 38
: 2 2a 42 4b: 2 42 50 58 5C: 2 50
14: 2 5: 6 1
1f
2
0: 3 1: 15 3: 6 1
91
4
: 3 0 1: 4 0 2
: 6 0 1: 2 0 3
: A 0 18 2: 4 0
5 38 0 3
5: 3 0 4: 7 0
7 6: 3 0 9
5E 0 7 5
: 3 0 6: 7 0 B
A: 3 0 8: 3 0
7: 7 0 f E
: 3 0 10 1B 0
B A: 3 0 B
: 3 0 9: 6 0 14
13: 3 0 16: 2 0
18 4 17 0
19 0 1B 19
1A 1C 3 1b
1D 2 1C 1e
: 8 0
12
4
: 3 0 1 5 1
9 1 D 1
11 4 8 C
10 15 1 18

1
4
0
1D
0
1
14
2
6
0 1 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0
11 2 0
5 2 0
9 2 0
D 2 0
4 1 2
3 0 1
0

/

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.