diff --git a/include/nuttx/crypto/blake2s.h b/include/nuttx/crypto/blake2s.h index fa6667fb6f..5ee6ffa744 100644 --- a/include/nuttx/crypto/blake2s.h +++ b/include/nuttx/crypto/blake2s.h @@ -91,7 +91,9 @@ typedef struct blake2s_param__ uint8_t xof_length[2]; /* 14 */ uint8_t node_depth; /* 15 */ uint8_t inner_length; /* 16 */ + /* uint8_t reserved[0]; */ + uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ } blake2s_param; @@ -109,15 +111,20 @@ typedef uint16_t uint16_alias_t __attribute__((may_alias, aligned(1))); /* Streaming API */ int blake2s_init(FAR blake2s_state *S, size_t outlen); -int blake2s_init_key(FAR blake2s_state *S, size_t outlen, FAR const void *key, +int blake2s_init_key(FAR blake2s_state *S, size_t outlen, + FAR const void *key, size_t keylen); -int blake2s_init_param(FAR blake2s_state *S, FAR const blake2s_param *P); -int blake2s_update(FAR blake2s_state *S, FAR const void *in, size_t inlen); -int blake2s_final(FAR blake2s_state *S, FAR void *out, size_t outlen); +int blake2s_init_param(FAR blake2s_state *S, + FAR const blake2s_param *P); +int blake2s_update(FAR blake2s_state *S, + FAR const void *in, size_t inlen); +int blake2s_final(FAR blake2s_state *S, + FAR void *out, size_t outlen); /* Simple API */ -int blake2s(FAR void *out, size_t outlen, FAR const void *in, size_t inlen, +int blake2s(FAR void *out, size_t outlen, + FAR const void *in, size_t inlen, FAR const void *key, size_t keylen); /**************************************************************************** diff --git a/include/nuttx/crypto/crypto.h b/include/nuttx/crypto/crypto.h index 8d155ffee3..6cc0985d5d 100644 --- a/include/nuttx/crypto/crypto.h +++ b/include/nuttx/crypto/crypto.h @@ -65,9 +65,9 @@ #define CYPHER_ENCRYPT 1 #define CYPHER_DECRYPT 0 -/******************************************************************************* +/**************************************************************************** * Public Data - ******************************************************************************/ + ****************************************************************************/ #ifndef __ASSEMBLY__ @@ -80,9 +80,9 @@ extern "C" #define EXTERN extern #endif -/******************************************************************************* +/**************************************************************************** * Public Function Prototypes - ******************************************************************************/ + ****************************************************************************/ int up_cryptoinitialize(void); diff --git a/include/nuttx/crypto/cryptodev.h b/include/nuttx/crypto/cryptodev.h index 8935e9c32f..08d62d1103 100644 --- a/include/nuttx/crypto/cryptodev.h +++ b/include/nuttx/crypto/cryptodev.h @@ -66,7 +66,7 @@ #define CIOCFSESSION 102 #define CIOCCRYPT 103 -typedef char* caddr_t; +typedef char *caddr_t; struct session_op {