调用相应的API对BLOB数据 相应的加密和解密 PL/SQL 加密解密 --加密function encrypt_aes256 (p_blob in blob, p_key in varchar2) return blobas l_key_raw raw(32); l_returnvalue blob;begin /* Purpose: encrypt blob Remarks: p_key should be 32 charac
调用相应的API对BLOB数据 相应的加密和解密 PL/SQL 加密解密--加密
function encrypt_aes256 (p_blob in blob,
p_key in varchar2) return blob
as
l_key_raw raw(32);
l_returnvalue blob;
begin
/*
Purpose: encrypt blob
Remarks: p_key should be 32 characters (256 bits / 8 = 32 bytes)
Who Date Description
------ ---------- -------------------------------------
MBR 20.01.2011 Created
*/
--获得 raw类型的key
l_key_raw := utl_raw.cast_to_raw (p_key);
dbms_lob.createtemporary (l_returnvalue, false);
dbms_crypto.encrypt (l_returnvalue, p_blob, g_encryption_type_aes, l_key_raw);
return l_returnvalue;
end encrypt_aes256;
--解密
function decrypt_aes256 (p_blob in blob,
p_key in varchar2) return blob
as
l_key_raw raw(32);
l_returnvalue blob;
begin
/*
Purpose: decrypt blob
Remarks: p_key should be 32 characters (256 bits / 8 = 32 bytes)
Who Date Description
------ ---------- -------------------------------------
MBR 20.01.2011 Created
*/
l_key_raw := utl_raw.cast_to_raw (p_key);
dbms_lob.createtemporary (l_returnvalue, false);
dbms_crypto.decrypt (l_returnvalue, p_blob, g_encryption_type_aes, l_key_raw);
return l_returnvalue;
end decrypt_aes256;
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号