My Oracle Support Banner

DBMS_CRYPTO.RANDOMBYTES Generating Values Double The Expected Length (Doc ID 1351654.1)

Last updated on AUGUST 04, 2018

Applies to:

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

Symptoms

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;

LENGTHB(DBMS_CRYPTO.RANDOMBYTES(128))
-------------------------------------
256

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
  Symptoms
  Cause
  Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.