René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
dbms_crypto | ||
dbms_crypto (available with 10g) has a better random generator than dbms_random.
The following three functions can be used
Procedures/Functionsdecryptfunction decrypt returns raw ( src in raw , typ in binary_integer , key in raw , iv in raw default ); procedure decrypt ( dst in out blob , src in blob , typ in binary_integer , key in raw , iv in raw default ); procedure decrypt ( dst in out clob , src in blob , typ in binary_integer , key in raw , iv in raw default ); encryptfunction encrypt returns raw ( src in raw , typ in binary_integer , key in raw , iv in raw default ); procedure encrypt ( dst in out blob , src in blob , typ in binary_integer , key in raw , iv in raw default ); procedure encrypt ( dst in out blob , src in clob , typ in binary_integer , key in raw , iv in raw default ); hashfunction hash returns raw ( src in raw , typ in binary_integer ); function hash returns raw ( src in blob , typ in binary_integer ); function hash returns raw ( src in clob , typ in binary_integer ); macfunction mac returns raw ( src in raw , typ in binary_integer , key in raw ); function mac returns raw ( src in blob , typ in binary_integer , key in raw ); function mac returns raw ( src in clob , typ in binary_integer , key in raw ); randombytesfunction randombytes returns raw ( number_bytes in binary_integer );
Oracle's documentation states that sqlnet.crypto_seed must be set
in the sqlnet.ora file; however, this option seems to be removed as can be seen
in the samples subdirectory of $ORACLE_HOME/NETWORK/ADMIN
Thanks to Frank van Bortel to bring that to my attention.
randomintegerfunction randominteger returns binary_integer ( ); randomnumberfunction randomnumber returns number ( ); |