des3encrypt語法如下:
dbms_obfuscation_toolkit.des3encrypt(,input =
> ,key =
> ,encrypted_data =
>
);
des3encrypt示例如下:
/*
該過程用於des3演算法時,對輸入資料進行加密,並生成加密格式的資料.
輸入資料必須是8的倍數,秘鑰不能少於16個字元;
*/declare
input varchar2(8):= 『中國你好』;
key varchar2(16):= 『1234567890abcdef』;
str varchar2(100)
;begin
dbms_obfuscation_toolkit.des3encrypt(
input_string =
> input,
key_string =
>key,
encrypted_string =
>str)
;dbms_output.put_line(str)
;end;
des3dncrypt語法如下:
/*
該過程用於des3演算法時,對生成的資料進行解密,解密秘鑰必須與加密秘鑰完全一致;
*/declare
input varchar2(8):= 『中國你好』;
key varchar2(16):= 『1234567890abcdef』;
str_in varchar2(100)
;str_out varchar2(100)
;begin
dbms_obfuscation_toolkit.des3encrypt(
input_string =
>input,
key_string =
>key,
encrypted_string =
>str_in )
;dbms_obfuscation_toolkit.des3decrypt(
input_string =
>str_in,
key_string =
>key,
decrypted_string =
>str_out)
;dbms_output.put_line(str_out)
;end;
使用mysqli方式進行資料庫查詢
一 mysql與mysqli的概念相關 1 mysql與mysqli都是php方面的函式集,與mysql資料庫關聯不大。2 在php5版本之前,一般是用php的mysql函式去驅動mysql資料庫的,比如mysql query 的函式,屬於面向過程3 在php5版本以後,增加了mysqli的函式功能...
Oralce資料庫進行資料加密方式對比
b 第一種 採用oracle自帶的tde欄位加密 b 目的 防止資料檔案被拷貝盜取。實現儲存資料加密。特點 1.此種加密方式稱為 透明資料加密 意思就是只加密資料實體檔案,而oralce使用者登陸資料庫,還可以看到原有的明文資料。原因是因為現有資料庫生成了加密證書,對於擁有證書的庫,可透明檢視資料明...
Python進行資料庫操作
python要對資料庫進行操作,首先要進行 python sql 連線,在 python 中進行資料庫連線的模組有 mysqldb pymysql,兩種連線方式用法一樣。以pymysql為例進行講解 安裝方法 linux ubuntu sudo pip install pymysql windows...