Hi I have been trying to implement dbms_crypto on XE beta 2 running on windows xp pro.
when i generate a 128 bit key using
dbms_crypto.randombytes (128)
and then insert that key into my insert statement i get
ORA 28234 - key length too short
i am using the following function to encrypt date
CREATE OR REPLACE FUNCTION INSTACHEX.ENCRYPT_FIELD
(
P_VALUE IN VARCHAR2,
P_KEY IN RAW
)
RETURN RAW IS
L_ENCRYPT_FIELD RAW (2000);
L_MOD NUMBER := dbms_crypto.ENCRYPT_AES128
+ dbms_crypto.CHAIN_CBC
+ dbms_crypto.PAD_PKCS5;
BEGIN
L_ENCRYPT_FIELD := dbms_crypto.ENCRYPT
(
UTL_I18N.STRING_TO_RAW
(P_VALUE, 'AL32UTF8'),
L_MOD,
P_KEY
);
RETURN L_ENCRYPT_FIELD;
END;
I read here
952178
that this is an issue in version 10.1.0.2 and can be fixed with a patch. Is there anyway to resolve this for XE?
Thanks
Danny Roach -
Read my blog here