DBMS_OBFUSCATION_TOOLKIT.des3decrypt : DBMS_OBFUSCATION_TOOLKIT « System Packages « Oracle PL / SQL

Oracle PL / SQL
1. Aggregate Functions
2. Analytical Functions
3. Char Functions
4. Constraints
5. Conversion Functions
6. Cursor
7. Data Type
8. Date Timezone
9. Hierarchical Query
10. Index
11. Insert Delete Update
12. Large Objects
13. Numeric Math Functions
14. Object Oriented Database
15. PL SQL
16. Regular Expressions
17. Report Column Page
18. Result Set
19. Select Query
20. Sequence
21. SQL Plus
22. Stored Procedure Function
23. Subquery
24. System Packages
25. System Tables Views
26. Table
27. Table Joins
28. Trigger
29. User Previliege
30. View
31. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL / SQL » System Packages » DBMS_OBFUSCATION_TOOLKIT 
DBMS_OBFUSCATION_TOOLKIT.des3decrypt
  
SQL>
SQL> CREATE OR REPLACE FUNCTION get_dec_val (
  2     p_in_val   VARCHAR2,
  3     p_key      VARCHAR2,
  4     p_iv       VARCHAR2 := NULL,
  5     p_which    NUMBER := 0
  6  )
  7     RETURN VARCHAR2
  8  IS
  9     l_dec_val   VARCHAR2 (2000);
 10     l_iv        VARCHAR2 (2000);
 11  BEGIN
 12     IF p_which = 0
 13     THEN
 14        IF LENGTH (p_key16
 15        THEN
 16           raise_application_error(-20001,'Key length less than 16 for two-pass scheme');
 17        END IF;
 18     ELSIF p_which = 1
 19     THEN
 20        IF LENGTH (p_key24
 21        THEN raise_application_error(-20002,'Key length less than 24 for three-pass scheme');
 22        END IF;
 23     ELSE
 24        raise_application_error (-20003,'Incorrect value of which '|| p_which|| '; must be or 1');
 25     END IF;
 26
 27     l_iv := RPAD (p_iv, (* ROUND (LENGTH (p_iv808));
 28     l_dec_val :=
 29        DBMS_OBFUSCATION_TOOLKIT.des3decrypt(input_string      => UTL_RAW.cast_to_varchar2(HEXTORAW (p_in_val)),key_string => p_key,iv_string => l_iv,which => p_which);
 30     RETURN RTRIM (l_dec_val);
 31  END;
 32  /


Function created.

SQL>

   
  
Related examples in the same category
1. DBMS_OBFUSCATION_TOOLKIT.des3getkey
2. DBMS_OBFUSCATION_TOOLKIT.des3encrypt
3. DBMS_OBFUSCATION_TOOLKIT.md5 and RAWTOHEX
4. dbms_obfuscation_toolkit.md5
5. Demonstrate DES3 encryption
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.