Oracle Database Encryption Scripts

Source: Internet
Author: User

----permission settings grant execute on dbms_crypto to username;---------Encryption create or  replace function encrypt256 (V_INPUT VARCHAR2)  return rawisv_result raw (1999); c_ Key char (+)  :=  ' 1q2wa3es4rz5tx6ycd*uf8tif9ogjen2 '; Beginv_result := sys. Dbms_crypto. ENCRYPT (utl_i18n. String_to_raw (v_input,  ' Al32utf8 '), sys. Dbms_crypto. Encrypt_aes256+sys. Dbms_crypto. Chain_cbc+sys. Dbms_crypto. pad_pkcs5,utl_i18n. String_to_raw (c_key,  ' Al32utf8 '));return v_result;end;-----------decryption create or replace  function decrypt256 (V_input raw)  return varchar2isv_result raw (1999); C_key char (  :=  ' 1q2wa3es4rz5tx6ycd*uf8tif9ogjen2 '; Beginv_result := sys. Dbms_crypto. DECRYPT (V_input,sys. Dbms_crypto. Encrypt_aes256+sys. Dbms_crypto. Chain_cbc+sys. Dbms_crypto. pad_pkcs5,utl_i18n. String_to_raw (c_key,  ' Al32utf8 ')); return utl_i18n. Raw_to_char (v_result,  ' Al32utf8 '); end;----MD5 encryption Create or replace function md5 (PASSWD IN VARCHAR2)  RETURN  VARCHAR2 IS  RETVAL VARCHAR2 (32); Begin  retval := utl_raw.cast_to_raw (Dbms_obfuscation_toolkit. MD5 (INPUT_STRING => PASSWD));  return retval; END;


Oracle Database Encryption Scripts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.