header5.jpg
首頁 arrow 專業討論區 
TWIUG Forum
歡迎, 訪客
登入註冊.
遺失密碼?
加密功能 (1 人正在瀏覽)
前往最底 張貼回覆

主題: 加密功能

#48
yvo_opc (用戶)
Fresh Boarder
文章: 3
graphgraph
加密功能 2007/06/11 16:46 聲譽: 0  
Informix 10.X 號稱有加密功能,不知是create table 時可指定or需透過程式來處理? 有無範例可參考?
  管理員已關閉公開寫入.
#50
Eric Lam (用戶)
Senior Boarder
文章: 11
graph
回覆:加密功能 2007/06/13 03:46 聲譽: 1  
你指的是 Column level encryption, 請參閱

http://www-1.ibm.com/support/docview.wss?uid=swg21221013&aid=1

內付完整的說明及sample

Create table and insert

create table emp ( name char(40),
salary money, ssn lvarchar(64) );
set encryption password to "one two three 123";
insert into emp
values ("Alice", 50000,
encrypt_aes (’123-456- 7890’));
insert into emp
values ("Bob", 65000,
encrypt_aes (’213-656-0890’));


Querying an encrypted column
The following example demonstrates how to use the decrypt function to query encrypted data:
select name, salary, decrypt_char(ssn, "one two three 123")
from emp
where decrypt_char(ssn) = ’123-456-7890’;

or
set encryption password to "one two three 123";
select name, salary, decrypt_char(ssn)
from customer
where decrypt(ssn) = ’123-456-7890’;

文章曾經由此用戶編輯: Eric Lam, 於: 2007/06/13 03:48
  管理員已關閉公開寫入.
#52
yvo_opc (用戶)
Fresh Boarder
文章: 3
graphgraph
回覆:加密功能 2007/06/14 16:24 聲譽: 0  
test ok, thanks a lot !
  管理員已關閉公開寫入.
前往最頂 張貼回覆
Copyright 2007 Best of Joomla, Powered by FireBoard直接取得最新文章到你的桌面