Mistake on this page? Email us
pal_plat_entropy.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2016-2019 ARM Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 
18 #ifndef _PAL_PLAT_ENTROPY_H
19 #define _PAL_PLAT_ENTROPY_H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #include "pal.h"
26 #include "pal_entropy.h"
27 #include <stdint.h>
28 
34 #define PAL_PLAT_MAX_ENTROPY_SIZE 48
36 
55 palStatus_t pal_plat_osEntropyInject(const uint8_t *entropyBuf, size_t bufSizeBytes);
56 
72 palStatus_t pal_plat_osEntropyRead(const char *entropyFileName, uint8_t *randomBufOut, size_t bufSizeBytes, size_t *actualRandomSizeBytesOut);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 #endif // _PAL_PLAT_ENTROPY_H
PAL. This file contains the general API to initiate and destroy the PAL component. This is part of the PAL service API.
palStatus_t pal_plat_osEntropyRead(const char *entropyFileName, uint8_t *randomBufOut, size_t bufSizeBytes, size_t *actualRandomSizeBytesOut)
Read entropy from non-volatile memory.
palStatus_t pal_plat_osEntropyInject(const uint8_t *entropyBuf, size_t bufSizeBytes)
Inject entropy to non-volatile memory, so that the random number generator may use it...
PAL entropy. This file contains entropy injection and is part of the PAL API.
int32_t palStatus_t
Definition: pal_types.h:49