libmobi
C library for handling MOBI format ebook documents
Functions
randombytes.h File Reference
#include "mobi.h"

Go to the source code of this file.

Functions

MOBI_RET mobi_randombytes (void *buf, const size_t len)
 Write n random bytes of high quality to buf. More...
 

Detailed Description

Copyright (c) 2021 Bartek Fabiszewski http://www.fabiszewski.net

This file is part of libmobi. Licensed under LGPL, either version 3, or any later. See http://www.gnu.org/licenses/

Function Documentation

◆ mobi_randombytes()

MOBI_RET mobi_randombytes ( void *  buf,
const size_t  size 
)

Write n random bytes of high quality to buf.

Parameters
[in,out]bufBuffer to be filled with random bytes
[in]lenBuffer length
Returns
On success returns MOBI_SUCCESS

Write n random bytes of high quality to buf.

Parameters
[in,out]bufBuffer
[in]sizeBuffer size (up to 256 bytes)
Returns
MOBI_RET status code (on success MOBI_SUCCESS)