diff options
author | nagendra modadugu <ngm@google.com> | 2015-12-21 16:18:26 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-12-22 13:12:53 -0800 |
commit | 617fb66fc71bbd21edb80d8093f60fa9a8ed6c1c (patch) | |
tree | 2863e8a4af87c8c5ce4ea53d6c9ccd76213528db /include | |
parent | e415307589ed3833fa4e07834139b7ef404a687e (diff) | |
download | chrome-ec-617fb66fc71bbd21edb80d8093f60fa9a8ed6c1c.tar.gz |
Move rand_bytes implementation from tpm2 to chip/g.
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/trng.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/trng.h b/include/trng.h index fe1c96825e..a35496c3fd 100644 --- a/include/trng.h +++ b/include/trng.h @@ -5,6 +5,8 @@ #ifndef __EC_INCLUDE_TRNG_H #define __EC_INCLUDE_TRNG_H +#include <sys/types.h> + /** * Initialize the true random number generator. * @@ -19,4 +21,11 @@ void init_trng(void); **/ 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 */ |