aboutsummaryrefslogtreecommitdiffstats
path: root/lib/include/tinycrypt/ctr_prng.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/include/tinycrypt/ctr_prng.h')
-rw-r--r--lib/include/tinycrypt/ctr_prng.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/lib/include/tinycrypt/ctr_prng.h b/lib/include/tinycrypt/ctr_prng.h
index 12cac8f..9be06db 100644
--- a/lib/include/tinycrypt/ctr_prng.h
+++ b/lib/include/tinycrypt/ctr_prng.h
@@ -67,8 +67,7 @@
extern "C" {
#endif
-typedef struct
-{
+typedef struct {
/* updated each time another BLOCKLEN_BYTES bytes are produced */
uint8_t V[TC_AES_BLOCK_SIZE];
@@ -99,11 +98,11 @@ typedef struct
* @param plen IN -- personalization length in bytes
*
*/
-int32_t tc_ctr_prng_init(TCCtrPrng_t * const ctx,
- uint8_t const * const entropy,
- uint32_t entropyLen,
- uint8_t const * const personalization,
- uint32_t pLen);
+int tc_ctr_prng_init(TCCtrPrng_t * const ctx,
+ uint8_t const * const entropy,
+ unsigned int entropyLen,
+ uint8_t const * const personalization,
+ unsigned int pLen);
/**
* @brief CTR-PRNG reseed procedure
@@ -124,11 +123,11 @@ int32_t tc_ctr_prng_init(TCCtrPrng_t * const ctx,
* @param additional_input IN -- additional input to the prng (may be null)
* @param additionallen IN -- additional input length in bytes
*/
-int32_t tc_ctr_prng_reseed(TCCtrPrng_t * const ctx,
- uint8_t const * const entropy,
- uint32_t entropyLen,
- uint8_t const * const additional_input,
- uint32_t additionallen);
+int tc_ctr_prng_reseed(TCCtrPrng_t * const ctx,
+ uint8_t const * const entropy,
+ unsigned int entropyLen,
+ uint8_t const * const additional_input,
+ unsigned int additionallen);
/**
* @brief CTR-PRNG generate procedure
@@ -146,11 +145,11 @@ int32_t tc_ctr_prng_reseed(TCCtrPrng_t * const ctx,
* @param out IN/OUT -- buffer to receive output
* @param outlen IN -- size of out buffer in bytes
*/
-int32_t tc_ctr_prng_generate(TCCtrPrng_t * const ctx,
- uint8_t const * const additional_input,
- uint32_t additionallen,
- uint8_t * const out,
- uint32_t outlen);
+int tc_ctr_prng_generate(TCCtrPrng_t * const ctx,
+ uint8_t const * const additional_input,
+ unsigned int additionallen,
+ uint8_t * const out,
+ unsigned int outlen);
/**
* @brief CTR-PRNG uninstantiate procedure
@@ -164,4 +163,4 @@ void tc_ctr_prng_uninstantiate(TCCtrPrng_t * const ctx);
}
#endif
-#endif
+#endif /* __TC_CTR_PRNG_H__ */