Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Min length of DBMS_CRYPTO.encrypt output
nkunkov_at_escholar.com wrote:
> Hi,
> I'm working with Oracle 10G and using DBMS_CRYPTO.ENCRYPT_AES256 to
> encrypt some values.
> There are two values that I'm encrypting: Number(32) and Varchar(12).
> These values will be displayed as part of the materialized view, and I
> need to limit the length of a column. I can't have it as
> varchar2(2000), I need some manageable length.
> I also have to store the encrypted values in a table and I don't want
> to make the column varchar2(2000) (since crypto returns raw(2000)).
> I'm wondering how can I "guess" the length of my output string so it
> can be used in a materialized view and to properly create the table to
> hold it. What does it depend upon? Will varchar(200) be enough?
> I'm using 256 bit encryption key.
> Your help is appreciated.
> NK
I'm not aware of anything that will allow you to limit or predict length. It may be a series of tests will get you there but not knowing your precise data it would be hard to predict.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Wed Jun 14 2006 - 11:11:23 CDT