mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
BRANCH=none TEST=none BUG=chrome-os-partner:43025,chrome-os-partner:47524 Signed-off-by: nagendra modadugu <ngm@google.com> Change-Id: Ic7a850fdf2594ac1981237edda8dceb16cc7cbe6 Reviewed-on: https://chromium-review.googlesource.com/319155 Commit-Ready: Nagendra Modadugu <ngm@google.com> Tested-by: Nagendra Modadugu <ngm@google.com> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
32 lines
639 B
C
32 lines
639 B
C
/* Copyright 2015 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef __EC_INCLUDE_TRNG_H
|
|
#define __EC_INCLUDE_TRNG_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
/**
|
|
* Initialize the true random number generator.
|
|
*
|
|
* Not supported by all platforms.
|
|
**/
|
|
void init_trng(void);
|
|
|
|
/**
|
|
* Retrieve a 32 bit random value.
|
|
*
|
|
* Not supported on all platforms.
|
|
**/
|
|
uint32_t rand(void);
|
|
|
|
/**
|
|
* Output len random bytes into buffer.
|
|
*
|
|
* Not supported on all platforms.
|
|
**/
|
|
void rand_bytes(void *buffer, size_t len);
|
|
|
|
#endif /* __EC_INCLUDE_TRNG_H */
|