You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/01/25 16:26:59 UTC
[incubator-nuttx] 06/12: include: nuttx: crypto: fix nxstyle errors
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 47141edb27a90a0bf832448e16bc640b32e4bb85
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Mon Jan 25 13:18:01 2021 +0100
include: nuttx: crypto: fix nxstyle errors
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <al...@sony.com>
---
include/nuttx/crypto/blake2s.h | 17 ++++++++++++-----
include/nuttx/crypto/crypto.h | 8 ++++----
include/nuttx/crypto/cryptodev.h | 2 +-
3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/include/nuttx/crypto/blake2s.h b/include/nuttx/crypto/blake2s.h
index fa6667f..5ee6ffa 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 8d155ff..6cc0985 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 8935e9c..08d62d1 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
{