Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Can I store encrypted data in char data type?

Re: Can I store encrypted data in char data type?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 27 Aug 2001 18:19:56 -0700
Message-ID: <9merjs01goe@drn.newsguy.com>


In article <9mefan$4dr_at_dispatch.concentric.net>, "JerryK" says...
>
>Hi,
>
>I am storing an encrypted version of the user's password in a table. Can I
>store this is a character data type if the encrypted form contains
>non-printiable characters?
>
>All I can guarantee about the string is that each character will have an
>ASCII value from 0 to 255.
>
>jerry
>
>
>

it'll be dangerous. If the client character set is not the same as the database servers -- character set conversion will kick in (eg: a unix server with 7 bit ascii and a windows client with 8 bit WE8ISO -- your encrypted data will be that much harder to "crack" as it will be changed)

I would recommend if you want to use a varchar2 or char type - put the HEX version of the data in there, not the raw bits and bytes.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Mon Aug 27 2001 - 20:19:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US