Platform Random Number

Includes:
"Common.h"

Introduction

This header contains function prototypes called by the WAC engine that must be implemented by the platform. These functions are called when the platform needs random numbers or bytes.



Functions

PlatformCryptoStrongRandomBytes

This function is called by the WAC engine when it needs cryptographically strong random bytes. This function should fill the inBuffer with inByteCount cryptographically strong bytes.


PlatformCryptoStrongRandomBytes


This function is called by the WAC engine when it needs cryptographically strong random bytes. This function should fill the inBuffer with inByteCount cryptographically strong bytes.

OSStatus PlatformCryptoStrongRandomBytes(
    void *inBuffer,
    size_t inByteCount );  
Parameters
inBuffer

The buffer to fill with random bytes. inBuffer must be malloc'd by the caller.

inByteCount

The length of the buffer to fill.

Return Value

kNoErr if successful or an error code indicating failure.