Home » SQL & PL/SQL » SQL & PL/SQL » DBMS_CRYPTO IN ORACLE 10G
DBMS_CRYPTO IN ORACLE 10G [message #285669] Wed, 05 December 2007 04:48 Go to next message
vjay
Messages: 16
Registered: December 2007
Location: chennai
Junior Member
HI,
I AM USING ORACLE 10G . I FOUND ONE PROCEDURE THAT IS ENCRIPTING AND DECRIPTING DATA .BUT SAME CODE I EXECUTED IT SHOWING ERROR

***********************************************************

DECLARE
l_credit_card_no VARCHAR2(19) := '1234 5678 9012 3456';
l_ccn_raw RAW(128) := UTL_RAW.cast_to_raw(l_credit_card_no);
l_key RAW(128) := UTL_RAW.cast_to_raw('abcdefgh');
l_encrypted_raw RAW(2048);
l_decrypted_raw RAW(2048);
BEGIN
DBMS_OUTPUT.put_line('Original : ' || l_credit_card_no);
l_encrypted_raw := DBMS_CRYPTO.ENCRYPT(src => l_ccn_raw,
typ => DBMS_CRYPTO.des_cbc_pkcs5,
KEY => l_key);
DBMS_OUTPUT.put_line('Encrypted : ' || RAWTOHEX(UTL_RAW.cast_to_raw(l_encrypted_raw)));
l_decrypted_raw := DBMS_CRYPTO.decrypt(src => l_encrypted_raw,
typ => DBMS_CRYPTO.des_cbc_pkcs5,
KEY => l_key);
DBMS_OUTPUT.put_line('Decrypted : ' || UTL_RAW.cast_to_varchar2(l_decrypted_raw));
END;

**************************************************

The following error has occurred:

ORA-06550: line 9, column 22:
PLS-00201: identifier 'DBMS_CRYPTO' must be declared
ORA-06550: line 9, column 3:
PL/SQL: Statement ignored
ORA-06550: line 13, column 22:
PLS-00201: identifier 'DBMS_CRYPTO' must be declared
ORA-06550: line 13, column 3:
PL/SQL: Statement ignored

10G WILL SUPPORT 'DBMS_CRYPTO' OR ERROR IN CODE?
LIKE THIS PROVISION I NEED URGENT SO ANY ALTERNATIVE LIKE THIS
PLEASE REPLY ME.
Re: DBMS_CRYPTO IN ORACLE 10G [message #285670 is a reply to message #285669] Wed, 05 December 2007 04:50 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ Read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.

2/ Don't post in upper case

3/ Don't use URGENT

4/ Always post your Oracle version (4 decimals).

All these are stated in forum rules.

5/ Your user does not have the privilege to execute the package or it is not installed.

Regards
Michel
Previous Topic: Triggers: how do I access values passed into a trigger?
Next Topic: PLSQL TABLE & USING FORALL
Goto Forum:
  


Current Time: Sat Dec 10 03:26:18 CST 2016

Total time taken to generate the page: 0.23400 seconds