使用 DBMS_CRYPTO 时,有没有办法在 pl/sql 中设置盐?
我的代码如下所示:
--PBEWithMD5AndTripleDES -> Origin Encryption algorithm
encryption_type PLS_INTEGER := SYS.DBMS_CRYPTO.DES3_CBC_PKCS5 + DBMS_CRYPTO.HASH_MD5;
saltInput RAW(2000); -- needed to parse value for decryption process
digestInput RAW(2000); -- needed to parse value for decryption process
password RAW(2000); -- Password (Raw) AL32UTF8 converted
rawOutput := SYS.DBMS_CRYPTO.DECRYPT
(
src => digestInput,
typ => encryption_type,
key => password
-- add salt here for the decryption like it was originally made
);
我需要添加加密时随机创建的盐并附加到加密值的前面。
我能够得到这种盐,但我无法告诉 DBMS_CRYPTO 使用盐来进行加密和解密算法。