Call: +44 (0)7759 277220 Call

Pete Finnigan's Oracle Security Weblog

This is the weblog for Pete Finnigan. Pete works in the area of Oracle security and he specialises in auditing Oracle databases for security issues. This weblog is aimed squarely at those interested in the security of their Oracle databases.

[Previous entry: "Prevention and detection better than cure"] [Next entry: "comments and how to re-enable them on this blog"]

How to encrypt/decrypt strings with the dbms_obfuscation_toolkit package

I saw last night a nice post on Francois Degrelle's blog titled "How to encrypt/decrypt strings with the dbms_obfuscation_toolkit package" that gives some nice example PL/SQL package that includes two functions, one to encrypt, one to decrypt a varchar2 string. The functions use the DBMS_OBFUSCATION_TOOLKIT DESEncrypt and DESDecrypt procedures. Although this package is now old hat and has been replaced by the better DBMS_CRYPTO in 10g. The example shows the problems of padding to 8 characters although doesn't show how to deal with encrypting different data types. Nice example.