Mistake on this page? Email us
pal_drbg.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // Copyright 2016-2019 ARM Ltd.
3 //
4 // SPDX-License-Identifier: Apache-2.0
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 // ----------------------------------------------------------------------------
18 #if !defined(MBED_CONF_MBED_CLOUD_CLIENT_EXTERNAL_SST_SUPPORT) || defined(MBED_CONF_MBED_CLOUD_CLIENT_PSA_SUPPORT)
19 #ifndef _PAL_DRBG_H
20 #define _PAL_DRBG_H
21 
22 #ifndef _PAL_H
23  #error "Please do not include this file directly, use pal.h instead"
24 #endif
25 
26 #include <stdint.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include "pal.h" //added for PAL_INITIAL_RANDOM_SIZE value
33 
52 palStatus_t pal_osRandomBuffer(uint8_t *randomBuf, size_t bufSizeBytes);
53 
62 palStatus_t pal_osRandom32bit(uint32_t *randomInt);
63 
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 #endif //_PAL_DRBG_H
69 #endif //MBED_CONF_MBED_CLOUD_CLIENT_EXTERNAL_SST_SUPPORT
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_osRandom32bit(uint32_t *randomInt)
Generate a 32-bit random number.
palStatus_t pal_osRandomBuffer(uint8_t *randomBuf, size_t bufSizeBytes)
Generate random number into given buffer with given size in bytes.
int32_t palStatus_t
Definition: pal_types.h:55