DBMS_CRYPTO.RANDOMBYTES Generating Values Double The Expected Length

(Doc ID 1351654.1)

Last updated on AUGUST 24, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: to - Release: 10.2 to 11.2
Information in this document applies to any platform.


When the dbms_crypto.randombytes package is used to generate a random sequence of bytes the returned result appears to be double the length specified.

For example,

SQL> select lengthb(dbms_crypto.randombytes(128)) from dual;



Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms