About Oracle Wrap Utility
These
utilities can load, encrypt, tune or debug
code objects. This chapter will focus on the
utilities that perform these functions,
including wrap, dbms_profiler, dbms_debug,
loadjava, dropjava and loadpsp.
The first of these utilities to be discussed
will be the wrap utility that allows PL/SQL
developers to encrypt their code.
PL/SQL Wrap Utility for Encryption
The wrap utility (wrap.exe) provides a way
for PL/SQL developers to protect their
intellectual property by making their PL/SQL
code unreadable. These encryption options
have long been available for other
programming languages and were introduced
for PL/SQL in version 7. It still amazes me
at the number of proprietary procedures and
packages that are installed in a readable
format – plain PL/SQL.
Unfortunately there is no such command as:
ALTER PACKAGE BODY [name] WRAP;
Instead, the wrap utility takes a readable,
ASCII text file as input and converts it to
a file containing byte code. The result is
that the DBA, developers or anyone with
database access cannot view the source code
in any readable format.
The command line options for wrap are:
wrap iname=[file] oname=[file]
Wrap only for production - Wrapping code is
desired for production environments but not
for profiling. It is much easier to see the
unencrypted form of the text in our reports
than it is to connect line numbers to source
versions. Use dbms_profiler before you wrap
your code in a test environment, wrap it,
and then put it in production.
One word of
caution here – wrap is an one-way encryption
process for the files; there is no un-wrap
function. So never throw away your original
file. The wrap is done to make sure that
someone peeking into the dba_source view
will not be able to see the code in clear
text.
|
|