Home GnuPG
Diffusion GPGME 926b1f1f1e3e

Add API gpgme_op_random_value.

Description

Add API gpgme_op_random_value.

* src/genrandom.c (getrandom_size_t): New.
(gpgme_op_random_value): New.
* src/gpgme.def: Add new function.
* src/libgpgme.vers: Ditto.
* src/gpgme.h.in: Add prototype.
* tests/run-genrandom.c: Add an option to use the new function.

The implementation is not optimized but sufficient for our use case.
Possible improvements for this and gpgme_op_random_bytes are a cache
for random bytes in the context so that we do not need to get out to
gpgme for just a few random bytes.

Details

Provenance
wernerAuthored on Fri, Mar 14, 1:03 PM
Parents
rM7568566ef3d1: m4: Update libassuan.m4.
Branches
Unknown
Tags
Unknown
Tasks
T6694: Random numbers from gpgme