1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-02-01 13:17:46 +02:00
pgbackrest/libc/xs/cipher/random.xs
2017-11-03 13:57:58 -04:00

20 lines
678 B
Plaintext

# ----------------------------------------------------------------------------------------------------------------------------------
# Random Perl Exports
# ----------------------------------------------------------------------------------------------------------------------------------
MODULE = pgBackRest::LibC PACKAGE = pgBackRest::LibC
####################################################################################################################################
SV *
randomBytes(size)
I32 size
CODE:
RETVAL = newSV(size);
SvPOK_only(RETVAL);
randomBytes((unsigned char *)SvPV_nolen(RETVAL), size);
SvCUR_set(RETVAL, size);
OUTPUT:
RETVAL