zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g" git grep -l 's\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g" Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
ee6fa31af6
commit
a1b77fd589
2364 changed files with 32505 additions and 32505 deletions
|
@ -120,7 +120,7 @@ static inline int cipher_begin_session(struct device *dev,
|
|||
enum cipher_op optype)
|
||||
{
|
||||
struct crypto_driver_api *api;
|
||||
u32_t flags;
|
||||
uint32_t flags;
|
||||
|
||||
api = (struct crypto_driver_api *) dev->driver_api;
|
||||
ctx->device = dev;
|
||||
|
@ -225,7 +225,7 @@ static inline int cipher_block_op(struct cipher_ctx *ctx,
|
|||
* @return 0 on success, negative errno code on fail.
|
||||
*/
|
||||
static inline int cipher_cbc_op(struct cipher_ctx *ctx,
|
||||
struct cipher_pkt *pkt, u8_t *iv)
|
||||
struct cipher_pkt *pkt, uint8_t *iv)
|
||||
{
|
||||
__ASSERT(ctx->ops.cipher_mode == CRYPTO_CIPHER_MODE_CBC, "CBC mode "
|
||||
"session invoking a different mode handler");
|
||||
|
@ -252,7 +252,7 @@ static inline int cipher_cbc_op(struct cipher_ctx *ctx,
|
|||
* @return 0 on success, negative errno code on fail.
|
||||
*/
|
||||
static inline int cipher_ctr_op(struct cipher_ctx *ctx,
|
||||
struct cipher_pkt *pkt, u8_t *iv)
|
||||
struct cipher_pkt *pkt, uint8_t *iv)
|
||||
{
|
||||
__ASSERT(ctx->ops.cipher_mode == CRYPTO_CIPHER_MODE_CTR, "CTR mode "
|
||||
"session invoking a different mode handler");
|
||||
|
@ -274,7 +274,7 @@ static inline int cipher_ctr_op(struct cipher_ctx *ctx,
|
|||
* @return 0 on success, negative errno code on fail.
|
||||
*/
|
||||
static inline int cipher_ccm_op(struct cipher_ctx *ctx,
|
||||
struct cipher_aead_pkt *pkt, u8_t *nonce)
|
||||
struct cipher_aead_pkt *pkt, uint8_t *nonce)
|
||||
{
|
||||
__ASSERT(ctx->ops.cipher_mode == CRYPTO_CIPHER_MODE_CCM, "CCM mode "
|
||||
"session invoking a different mode handler");
|
||||
|
@ -296,7 +296,7 @@ static inline int cipher_ccm_op(struct cipher_ctx *ctx,
|
|||
* @return 0 on success, negative errno code on fail.
|
||||
*/
|
||||
static inline int cipher_gcm_op(struct cipher_ctx *ctx,
|
||||
struct cipher_aead_pkt *pkt, u8_t *nonce)
|
||||
struct cipher_aead_pkt *pkt, uint8_t *nonce)
|
||||
{
|
||||
__ASSERT(ctx->ops.cipher_mode == CRYPTO_CIPHER_MODE_GCM, "GCM mode "
|
||||
"session invoking a different mode handler");
|
||||
|
|
|
@ -60,16 +60,16 @@ typedef int (*block_op_t)(struct cipher_ctx *ctx, struct cipher_pkt *pkt);
|
|||
* like CBC, CTR, CCM.
|
||||
*/
|
||||
typedef int (*cbc_op_t)(struct cipher_ctx *ctx, struct cipher_pkt *pkt,
|
||||
u8_t *iv);
|
||||
uint8_t *iv);
|
||||
|
||||
typedef int (*ctr_op_t)(struct cipher_ctx *ctx, struct cipher_pkt *pkt,
|
||||
u8_t *ctr);
|
||||
uint8_t *ctr);
|
||||
|
||||
typedef int (*ccm_op_t)(struct cipher_ctx *ctx, struct cipher_aead_pkt *pkt,
|
||||
u8_t *nonce);
|
||||
uint8_t *nonce);
|
||||
|
||||
typedef int (*gcm_op_t)(struct cipher_ctx *ctx, struct cipher_aead_pkt *pkt,
|
||||
u8_t *nonce);
|
||||
uint8_t *nonce);
|
||||
|
||||
struct cipher_ops {
|
||||
|
||||
|
@ -85,20 +85,20 @@ struct cipher_ops {
|
|||
};
|
||||
|
||||
struct ccm_params {
|
||||
u16_t tag_len;
|
||||
u16_t nonce_len;
|
||||
uint16_t tag_len;
|
||||
uint16_t nonce_len;
|
||||
};
|
||||
|
||||
struct ctr_params {
|
||||
/* CTR mode counter is a split counter composed of iv and counter
|
||||
* such that ivlen + ctr_len = keylen
|
||||
*/
|
||||
u32_t ctr_len;
|
||||
uint32_t ctr_len;
|
||||
};
|
||||
|
||||
struct gcm_params {
|
||||
u16_t tag_len;
|
||||
u16_t nonce_len;
|
||||
uint16_t tag_len;
|
||||
uint16_t nonce_len;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -118,7 +118,7 @@ struct cipher_ctx {
|
|||
/** To be populated by the app before calling begin_session() */
|
||||
union {
|
||||
/* Cryptographic key to be used in this session */
|
||||
u8_t *bit_stream;
|
||||
uint8_t *bit_stream;
|
||||
/* For cases where key is protected and is not
|
||||
* available to caller
|
||||
*/
|
||||
|
@ -158,7 +158,7 @@ struct cipher_ctx {
|
|||
/** Cryptographic keylength in bytes. To be populated by the app
|
||||
* before calling begin_session()
|
||||
*/
|
||||
u16_t keylen;
|
||||
uint16_t keylen;
|
||||
|
||||
/** How certain fields are to be interpreted for this session.
|
||||
* (A bitmask of CAP_* below.)
|
||||
|
@ -166,7 +166,7 @@ struct cipher_ctx {
|
|||
* An app can obtain the capability flags supported by a hw/driver
|
||||
* by calling cipher_query_hwcaps().
|
||||
*/
|
||||
u16_t flags;
|
||||
uint16_t flags;
|
||||
};
|
||||
|
||||
/* cipher_ctx.flags values. Not all drivers support all flags.
|
||||
|
@ -211,7 +211,7 @@ struct cipher_ctx {
|
|||
struct cipher_pkt {
|
||||
|
||||
/** Start address of input buffer */
|
||||
u8_t *in_buf;
|
||||
uint8_t *in_buf;
|
||||
|
||||
/** Bytes to be operated upon */
|
||||
int in_len;
|
||||
|
@ -220,7 +220,7 @@ struct cipher_pkt {
|
|||
* the application. Can be NULL for in-place ops. To be populated
|
||||
* with contents by the driver on return from op / async callback.
|
||||
*/
|
||||
u8_t *out_buf;
|
||||
uint8_t *out_buf;
|
||||
|
||||
/** Size of the out_buf area allocated by the application. Drivers
|
||||
* should not write past the size of output buffer.
|
||||
|
@ -252,16 +252,16 @@ struct cipher_aead_pkt {
|
|||
/**
|
||||
* Start address for Associated Data. This has to be supplied by app.
|
||||
*/
|
||||
u8_t *ad;
|
||||
uint8_t *ad;
|
||||
|
||||
/** Size of Associated Data. This has to be supplied by the app. */
|
||||
u32_t ad_len;
|
||||
uint32_t ad_len;
|
||||
|
||||
/** Start address for the auth hash. For an encryption op this will
|
||||
* be populated by the driver when it returns from cipher_ccm_op call.
|
||||
* For a decryption op this has to be supplied by the app.
|
||||
*/
|
||||
u8_t *tag;
|
||||
uint8_t *tag;
|
||||
};
|
||||
|
||||
/* Prototype for the application function to be invoked by the crypto driver
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue