oracle加密工具
在 Oracle 存储过程中所包含的商业秘密,有时不愿意被第三方人员看到,可以通过对存储过程加密来实现。 有两种加密存储过程的方法:这里重点介绍 wrap: Wrap 是 Oracle 所提供的操作系统级的命令 ,其加密的原理就是先对源码进行 lz 压缩 lzstr ,然后对压
在Oracle存储过程中所包含的商业秘密,有时不愿意被第三方人员看到,可以通过对存储过程加密来实现。
有两种加密存储过程的方法:这里重点介绍wrap:
Wrap是Oracle所提供的操作系统级的命令,其加密的原理就是先对源码进行lz压缩lzstr,然后对压缩数据进行SHA-1运算得到40位的加密串shstr,然后将加密串与压缩串拼接得到shstr+lzstr,然后对拼接后的字符串进行Oracle双字符转换(转换表)。最后将转换后的字符串进行base64编码,最终得到wrap的加密串。Oracle本身没有提供unwrap工具,wrap语法如下:
wrap iname=input_file [oname=output_file] |
参数iname为要加密的文件名,oname为加密后的文件名。如果省略oname,那么将会自动产生一个同名的加密文件名,且后缀为plb。
我们来演示一下wrap工具的用法。首先创建一个名称为test.txt的文件:
[oracle@pigeon ~]$ which wrap
/u01/product/10.2.0/bin/wrap #wrap所在目录
[oracle@pigeon ~]$ wrap iname=test.txt
PL/SQL Wrapper: Release 10.2.0.1.0- Production on Mon Jan 17 15:14:11 2011
Copyright (c) 1993, 2004, Oracle. All rights reserved.
Processing test.txt to test.plb
[oracle@pigeon ~]$ ls
autostartosw.sh Desktop l0db.sh raw.txt sde2.dmp sde.dmp startdb.sh stop.pigeon test.plb(新生成一个同名不同后缀的文件) test.txt
下面分别查看两个文件的内容:
[oracle@pigeon ~]$ more test.txt
create or replace procedure test
is
begin
dbms_output.put_line('welcome to oracle!');
end;
/
[oracle@pigeon ~]$ more test.plb
create or replace procedure test wrapped
a000000
354
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
7
49 85
zzrHcdOhOYaYaHu+gE2KKyNe6L4wg5nnm7+fMr2ywFznUrLL7pt0i8DAMv7ShsBSm7JK/iiy
veeysx0GMCyuJOqygZt3bl3kaMMC8c8C5FHbXW7D6TIu9tHqJB/2Oab7j44p
/
[oracle@pigeon ~]$
下面使用密文创建与调用创建的procedure
[oracle@pigeon ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 17 15:16:06 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn / as sysdba;
Connected.
--复制密文:
SQL> create or replace procedure test wrapped
2 a000000
3 354
4 abcd
5 abcd
6 abcd
7 abcd
8 abcd
9 abcd
10 abcd
11 abcd
12 abcd
13 abcd
14 abcd
15 abcd
16 abcd
17 abcd
18 abcd
19 7
20 49 85
21 zzrHcdOhOYaYaHu+gE2KKyNe6L4wg5nnm7+fMr2ywFznUrLL7pt0i8DAMv7ShsBSm7JK/iiy
22 veeysx0GMCyuJOqygZt3bl3kaMMC8c8C5FHbXW7D6TIu9tHqJB/2Oab7j44p
23
24 /
Procedure created.
当需要加密的文件很多时,也可以这样:
SQL> start /home/oracle/test.plb;
Procedure created.
SQL>
SQL> set serveroutput on;
SQL> exec test;#执行test过程,正确输出
welcome to oracle!
PL/SQL procedure successfully completed.
SQL>
现在就可以把文件test.plb发给客户使用了,而不必担心你的源代码的暴露。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When managing WordPress websites, you often encounter complex operations such as installation, update, and multi-site conversion. These operations are not only time-consuming, but also prone to errors, causing the website to be paralyzed. Combining the WP-CLI core command with Composer can greatly simplify these tasks, improve efficiency and reliability. This article will introduce how to use Composer to solve these problems and improve the convenience of WordPress management.

I encountered a tricky problem when developing a small application: the need to quickly integrate a lightweight database operation library. After trying multiple libraries, I found that they either have too much functionality or are not very compatible. Eventually, I found minii/db, a simplified version based on Yii2 that solved my problem perfectly.

During the development process, we often need to perform syntax checks on PHP code to ensure the correctness and maintainability of the code. However, when the project is large, the single-threaded syntax checking process can become very slow. Recently, I encountered this problem in my project. After trying multiple methods, I finally found the library overtrue/phplint, which greatly improves the speed of code inspection through parallel processing.

In the process of developing a website, improving page loading has always been one of my top priorities. Once, I tried using the Miniify library to compress and merge CSS and JavaScript files in order to improve the performance of the website. However, I encountered many problems and challenges during use, which eventually made me realize that Miniify may no longer be the best choice. Below I will share my experience and how to install and use Minify through Composer.

I'm having a tricky problem when developing a front-end project: I need to manually add a browser prefix to the CSS properties to ensure compatibility. This is not only time consuming, but also error-prone. After some exploration, I discovered the padaliyajay/php-autoprefixer library, which easily solved my troubles with Composer.

When developing websites using CraftCMS, you often encounter resource file caching problems, especially when you frequently update CSS and JavaScript files, old versions of files may still be cached by the browser, causing users to not see the latest changes in time. This problem not only affects the user experience, but also increases the difficulty of development and debugging. Recently, I encountered similar troubles in my project, and after some exploration, I found the plugin wiejeben/craft-laravel-mix, which perfectly solved my caching problem.

When developing PHP projects, you often encounter the problem that some functions or methods have been executed for too long, causing program timeout. I've tried multiple solutions, but the results are not satisfactory until I discovered the phpunit/php-invoker library. This library completely solved my problem by setting the timeout time to call the executable function.

When using TYPO3CMS for website development, you often encounter problems with installation and configuration extensions. Especially for beginners, how to properly install and configure TYPO3 and its extensions can be a headache. I had similar difficulties in my actual project and ended up solving these problems by using Composer and TYPO3CMSComposerInstallers.
