Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / May 2006

Tip: Looking for answers? Try searching our database.

About Encrypted Data In DB2 UDB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Suresh - 26 Apr 2006 13:51 GMT
Hi All

I have one column  which has data type of varchar only. in this column
i want to store some secured data (I want to store this data by
encrpting using db2 encryption function).But along with this encrypted
data this column contains normal data also..

But in DB2 while storing encrypted data column should be defined FOR
BIT DATA.
In my case how should I go as my column contains both encrypted and
normal data in same column.

Thanks
Suresh
Serge Rielau - 26 Apr 2006 14:02 GMT
> Hi All
>
[quoted text clipped - 7 lines]
> In my case how should I go as my column contains both encrypted and
> normal data in same column.
Split your column. The fact that some part of your column has different
requirements is an indicator that you should have different columns to
begin with.

Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Suresh - 26 Apr 2006 14:26 GMT
is there any way other than spliting column bcoz i am storing history
data in old value, new value pair in this table and i can not split the
columns.
tuarek - 26 Apr 2006 18:03 GMT
Suresh,

Would it be ok for your data security policy, if you use encrypt scalar
function for your secured data? Use encrypt scalar function when
inserting your data.

insert into mytable values encrypt(...)

Regards,

Mehmet
Suresh - 27 Apr 2006 06:07 GMT
While using scalar function of encryption on secured data , column data
type should be for bit data, otherwise i cannot use decrypt scalar
function to retrive data. But because of my design limitation i can not
place datatype as for bit data so any other way?
Serge Rielau - 27 Apr 2006 11:23 GMT
> While using scalar function of encryption on secured data , column data
> type should be for bit data, otherwise i cannot use decrypt scalar
> function to retrive data. But because of my design limitation i can not
> place datatype as for bit data so any other way?

Suresh you can cast yoru string from and to for bit data.
CAST (c1 AS VARCHAR(10) FOR BIT DATA)
CAST (c1bit AS VARCHAR(10) FOR SBCS DATA)
Since this cast does nothing more that strip the codepage and place it
back it's non invasive.

Cheers
Serge

Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Suresh - 27 Apr 2006 15:58 GMT
Thanks it worked for me......
Mehmet Baserdem - 27 Apr 2006 16:57 GMT
Suresh,

Can you post your encrypt and decrypt statements' final version ?  Just
column phrases would be enough.

thanks

Mehmet
Suresh - 02 May 2006 07:02 GMT
Here i am forwarding u exapmle with column name XYZ of Varchar type
DECRYPT_CHAR(CAST(XYZ AS VARCHAR(200) FOR BIT DATA))
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.