Skip to main content

Application Development Kit (Version 4.8)


Random Number Generation

Last updated: 02-Oct-2025

The PCI-PTS approved random generator shall be used when random numbers are required by the SRED encryption scheme and have to be generated by the application code.

Use the character special file "/dev/urandom" or "/dev/random" for getting the values from the approved random number generator; e.g.

Example: get random number

int get_random(void *buf, size_t len) {    int rc;    int fd = open("/dev/urandom", O_RDONLY);             if (fd < 0) {        rc = fd;    } else {        rc = read(fd, buf, len);        close(fd);    }    return rc;}

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo