Oracle 10g new features-code obfuscation, stored procedure encryption

Source: Internet
Author: User
Oracle 10g new features-code obfuscation

Author: Fuyuncat

Source: www.HelloDBA.com

Oracle 9i Previously, a command ' warp ' was provided to encrypt the code. But it's command-line, it's script-oriented. In 10g, Oracle Package DBMS_DDL provides a new function create_wrapped to confuse the code. Example:

Sql> Declare

2 V_protex varchar2 (2000): = '

3 CREATE OR REPLACE PROCEDURE p_wraptest

4 is

5 V_count number;

6 BEGIN

7 Select COUNT (*) into the v_count from User_tables;

8 Dbms_output. Put_Line (' Tables number is: ' | | v_count);

9 End;

10 ';

Begin

The SYS. Dbms_ddl. Create_wrapped (V_protex);

The end;

14/

Pl/sql procedure successfully completed

Then look at the confusing code:

sql> SELECT text from user_source WHERE name = ' P_wraptest ';

TEXT

--------------------------------------------------------------------------------

PROCEDURE P_wraptest Wrapped

a000000

367

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

Abcd

7

A0 db

P9j84ore7zt5hy6ayflid/b/8ymwgwbf2ssvfc+ijhayzffpukzxltm5k5uum9gjb/cjyvte

80zl0ai2lsfoiy6xzizux8j8bnd0s8hl6azuckp25+esapoeakn9ow9qaxvoft8kqbkotyy+

gchxfoqrjwpme3cjliplboieddlfcjqzmryw1xqa0ejcr3ka5lsfm9qrgt1wgrqqpg5d1y8=

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.