RANDOM_BYTES

MariaDB starting with 10.10.0

The RANDOM_BYTES function generates a binary string of random bytes. It was added in MariaDB 10.10.0.

Syntax

RANDOM_BYTES(length)

Description

Given a length from 1 to 1024, generates a binary string of length consisting of random bytes generated by the SSL library's random number generator.

See the RAND_bytes() function documentation of your SSL library for information on the random number generator. In the case of OpenSSL, a cryptographically secure pseudo random generator (CSPRNG) is used.

Statements containing the RANDOM_BYTES function are unsafe for statement-based replication.

An error occurs if length is outside the range 1 to 1024.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.