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: Min length of DBMS_CRYPTO.encrypt output

Re: Min length of DBMS_CRYPTO.encrypt output

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 14 Jun 2006 09:11:23 -0700
Message-ID: <1150301488.351092@bubbleator.drizzle.com>


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.org
Received on Wed Jun 14 2006 - 11:11:23 CDT

Original text of this message

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