RANDOMBYTES v16

The RANDOMBYTES function returns a RAW value of the specified length, containing cryptographically random bytes. The signature is:

RANDOMBYTES
  (<number_bytes> IN INTEGER) RETURNS RAW

Parameter

number_bytes

number_bytes specifies the number of random bytes to return.

Examples

This example uses RANDOMBYTES to return a value that is 1024 bytes long:

DECLARE
  result RAW(1024);
BEGIN
  result := DBMS_CRYPTO.RANDOMBYTES(1024);
END;