Skip to content

Commit 0aa789a

Browse files
authored
Merge pull request #9458 from LinuxJedi/doc_fixes
Fix issues with the API documentation
2 parents 45b7fb9 + 2376e48 commit 0aa789a

27 files changed

Lines changed: 284 additions & 263 deletions

doc/dox_comments/header_files/aes.h

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ int wc_AesInit(Aes* aes, void* heap, int devId);
10211021
10221022
\sa wc_AesInit
10231023
*/
1024-
int wc_AesFree(Aes* aes);
1024+
void wc_AesFree(Aes* aes);
10251025

10261026
/*!
10271027
\ingroup AES
@@ -1203,19 +1203,19 @@ int wc_AesSivDecrypt(const byte* key, word32 keySz, const byte* assoc,
12031203
\return other negative error values returned if AES or CMAC operations
12041204
fail.
12051205
1206-
\param key buffer containing the key to use
1207-
\param keySz length of the key buffer in bytes
1206+
\param [in] key buffer containing the key to use
1207+
\param [in] keySz length of the key buffer in bytes
12081208
\param[out] out buffer to hold the ciphertext. Should be the same length as
12091209
the plaintext buffer
1210-
\param in plaintext buffer to encrypt
1211-
\param inSz length of plaintext buffer
1212-
\param nonce the cryptographic nonce to use for EAX operations
1213-
\param nonceSz length of nonce buffer in bytes
1210+
\param [in] in plaintext buffer to encrypt
1211+
\param [in] inSz length of plaintext buffer
1212+
\param [in] nonce the cryptographic nonce to use for EAX operations
1213+
\param [in] nonceSz length of nonce buffer in bytes
12141214
\param[out] authTag pointer to the buffer in which to store the
12151215
authentication tag
1216-
\param authTagSz length of the desired authentication tag
1217-
\param authIn pointer to the buffer containing input data to authenticate
1218-
\param authInSz length of the input authentication data
1216+
\param [in] authTagSz length of the desired authentication tag
1217+
\param [in] authIn pointer to the buffer containing input data to authenticate
1218+
\param [in] authInSz length of the input authentication data
12191219
12201220
_Example_
12211221
\code
@@ -1266,19 +1266,19 @@ WOLFSSL_API int wc_AesEaxEncryptAuth(const byte* key, word32 keySz, byte* out,
12661266
\return other negative error values returned if AES or CMAC operations
12671267
fail.
12681268
1269-
\param key byte buffer containing the key to use
1270-
\param keySz length of the key buffer in bytes
1269+
\param [in] key byte buffer containing the key to use
1270+
\param [in] keySz length of the key buffer in bytes
12711271
\param[out] out buffer to hold the plaintext. Should be the same length as
12721272
the input ciphertext buffer
1273-
\param in ciphertext buffer to decrypt
1274-
\param inSz length of ciphertext buffer
1275-
\param nonce the cryptographic nonce to use for EAX operations
1276-
\param nonceSz length of nonce buffer in bytes
1277-
\param authTag buffer that holds the authentication tag to check the
1273+
\param [in] in ciphertext buffer to decrypt
1274+
\param [in] inSz length of ciphertext buffer
1275+
\param [in] nonce the cryptographic nonce to use for EAX operations
1276+
\param [in] nonceSz length of nonce buffer in bytes
1277+
\param [in] authTag buffer that holds the authentication tag to check the
12781278
authenticity of the data against
1279-
\param authTagSz Length of the input authentication tag
1280-
\param authIn pointer to the buffer containing input data to authenticate
1281-
\param authInSz length of the input authentication data
1279+
\param [in] authTagSz Length of the input authentication tag
1280+
\param [in] authIn pointer to the buffer containing input data to authenticate
1281+
\param [in] authInSz length of the input authentication data
12821282
12831283
_Example_
12841284
\code
@@ -1390,13 +1390,13 @@ WOLFSSL_API int wc_AesEaxInit(AesEax* eax,
13901390
\return 0 on success
13911391
\return error code on failure
13921392
1393-
\param eax AES EAX structure holding the context of the AEAD operation
1393+
\param [in] eax AES EAX structure holding the context of the AEAD operation
13941394
\param[out] out output buffer holding the ciphertext
1395-
\param in input buffer holding the plaintext to encrypt
1396-
\param inSz size in bytes of the input data buffer
1397-
\param authIn (optional) input data to add to the authentication stream
1395+
\param [in] in input buffer holding the plaintext to encrypt
1396+
\param [in] inSz size in bytes of the input data buffer
1397+
\param [in] authIn (optional) input data to add to the authentication stream
13981398
This argument should be NULL if not used
1399-
\param authInSz size in bytes of the input authentication data
1399+
\param [in] authInSz size in bytes of the input authentication data
14001400
14011401
_Example_
14021402
\code
@@ -1455,13 +1455,13 @@ WOLFSSL_API int wc_AesEaxEncryptUpdate(AesEax* eax, byte* out,
14551455
\return 0 on success
14561456
\return error code on failure
14571457
1458-
\param eax AES EAX structure holding the context of the AEAD operation
1458+
\param [in] eax AES EAX structure holding the context of the AEAD operation
14591459
\param[out] out output buffer holding the decrypted plaintext
1460-
\param in input buffer holding the ciphertext
1461-
\param inSz size in bytes of the input data buffer
1462-
\param authIn (optional) input data to add to the authentication stream
1460+
\param [in] in input buffer holding the ciphertext
1461+
\param [in] inSz size in bytes of the input data buffer
1462+
\param [in] authIn (optional) input data to add to the authentication stream
14631463
This argument should be NULL if not used
1464-
\param authInSz size in bytes of the input authentication data
1464+
\param [in] authInSz size in bytes of the input authentication data
14651465
14661466
14671467
_Example_
@@ -1742,13 +1742,13 @@ WOLFSSL_API int wc_AesEaxFree(AesEax* eax);
17421742
\return BAD_FUNC_ARG if input arguments are invalid.
17431743
\return other negative error codes for encryption failures.
17441744
1745-
\param key pointer to the AES key used for encryption.
1746-
\param keySz size of the AES key in bytes (16, 24, or 32 bytes).
1745+
\param [in] key pointer to the AES key used for encryption.
1746+
\param [in] keySz size of the AES key in bytes (16, 24, or 32 bytes).
17471747
\param[out] out buffer to hold the encrypted ciphertext. Must be at least
17481748
the size of the input.
1749-
\param in pointer to the plaintext input data to encrypt.
1750-
\param inSz size of the plaintext input data in bytes.
1751-
\param iv pointer to the initialization vector (IV) used for encryption.
1749+
\param [in] in pointer to the plaintext input data to encrypt.
1750+
\param [in] inSz size of the plaintext input data in bytes.
1751+
\param [in] iv pointer to the initialization vector (IV) used for encryption.
17521752
Must be 16 bytes.
17531753
17541754
_Example_
@@ -1780,13 +1780,13 @@ int wc_AesCtsEncrypt(const byte* key, word32 keySz, byte* out,
17801780
\return BAD_FUNC_ARG if input arguments are invalid.
17811781
\return other negative error codes for encryption failures.
17821782
1783-
\param key pointer to the AES key used for encryption.
1784-
\param keySz size of the AES key in bytes (16, 24, or 32 bytes).
1783+
\param [in] key pointer to the AES key used for encryption.
1784+
\param [in] keySz size of the AES key in bytes (16, 24, or 32 bytes).
17851785
\param[out] out buffer to hold the encrypted ciphertext. Must be at least
17861786
the same size as the input plaintext.
1787-
\param in pointer to the plaintext input data to encrypt.
1788-
\param inSz size of the plaintext input data in bytes.
1789-
\param iv pointer to the initialization vector (IV) used for encryption.
1787+
\param [in] in pointer to the plaintext input data to encrypt.
1788+
\param [in] inSz size of the plaintext input data in bytes.
1789+
\param [in] iv pointer to the initialization vector (IV) used for encryption.
17901790
Must be 16 bytes.
17911791
_Example_
17921792
\code
@@ -1813,13 +1813,13 @@ int wc_AesCtsEncrypt(const byte* key, word32 keySz, byte* out,
18131813
\return 0 on successful decryption.
18141814
\return BAD_FUNC_ARG if input arguments are invalid.
18151815
\return other negative error codes for decryption failures.
1816-
\param key pointer to the AES key used for decryption.
1817-
\param keySz size of the AES key in bytes (16, 24, or 32 bytes).
1816+
\param [in] key pointer to the AES key used for decryption.
1817+
\param [in] keySz size of the AES key in bytes (16, 24, or 32 bytes).
18181818
\param[out] out buffer to hold the decrypted plaintext. Must be at least
18191819
the same size as the input ciphertext.
1820-
\param in pointer to the ciphertext input data to decrypt.
1821-
\param inSz size of the ciphertext input data in bytes.
1822-
\param iv pointer to the initialization vector (IV) used for decryption.
1820+
\param [in] in pointer to the ciphertext input data to decrypt.
1821+
\param [in] inSz size of the ciphertext input data in bytes.
1822+
\param [in] iv pointer to the initialization vector (IV) used for decryption.
18231823
Must be 16 bytes.
18241824
_Example_
18251825
\code
@@ -1845,14 +1845,14 @@ int wc_AesCtsDecrypt(const byte* key, word32 keySz, byte* out,
18451845
It processes a chunk of plaintext and stores intermediate data.
18461846
\return 0 on successful processing.
18471847
\return BAD_FUNC_ARG if input arguments are invalid.
1848-
\param aes pointer to the Aes structure holding the context of the operation.
1848+
\param [in] aes pointer to the Aes structure holding the context of the operation.
18491849
\param[out] out buffer to hold the encrypted ciphertext. Must be large enough
18501850
to store the output from this update step.
18511851
\param[out] outSz size in bytes of the output data written to the \c out buffer.
1852-
On input, it should contain the maximum number of bytes that can
1853-
be written to the \c out buffer.
1854-
\param in pointer to the plaintext input data to encrypt.
1855-
\param inSz size of the plaintext input data in bytes.
1852+
On input, it should contain the maximum number of bytes that can
1853+
be written to the \c out buffer.
1854+
\param [in] in pointer to the plaintext input data to encrypt.
1855+
\param [in] inSz size of the plaintext input data in bytes.
18561856
_Example_
18571857
\code
18581858
Aes aes;
@@ -1880,7 +1880,7 @@ int wc_AesCtsEncryptUpdate(Aes* aes, byte* out, word32* outSz,
18801880
It processes any remaining plaintext and completes the encryption.
18811881
\return 0 on successful encryption completion.
18821882
\return BAD_FUNC_ARG if input arguments are invalid.
1883-
\param aes pointer to the Aes structure holding the context of the operation.
1883+
\param [in] aes pointer to the Aes structure holding the context of the operation.
18841884
\param[out] out buffer to hold the final encrypted ciphertext. Must be large
18851885
enough to store any remaining ciphertext from this final step.
18861886
\param[out] outSz size in bytes of the output data written to the \c out buffer.
@@ -1913,14 +1913,14 @@ int wc_AesCtsEncryptFinal(Aes* aes, byte* out, word32* outSz);
19131913
It processes a chunk of ciphertext and stores intermediate data.
19141914
\return 0 on successful processing.
19151915
\return BAD_FUNC_ARG if input arguments are invalid.
1916-
\param aes pointer to the Aes structure holding the context of the operation.
1916+
\param [in] aes pointer to the Aes structure holding the context of the operation.
19171917
\param[out] out buffer to hold the decrypted plaintext. Must be large enough
19181918
to store the output from this update step.
19191919
\param[out] outSz size in bytes of the output data written to the \c out buffer.
19201920
On input, it should contain the maximum number of bytes that can
19211921
be written to the \c out buffer.
1922-
\param in pointer to the ciphertext input data to decrypt.
1923-
\param inSz size of the ciphertext input data in bytes.
1922+
\param [in] in pointer to the ciphertext input data to decrypt.
1923+
\param [in] inSz size of the ciphertext input data in bytes.
19241924
_Example_
19251925
\code
19261926
Aes aes;
@@ -1948,7 +1948,7 @@ int wc_AesCtsDecryptUpdate(Aes* aes, byte* out, word32* outSz,
19481948
It processes any remaining ciphertext and completes the decryption.
19491949
\return 0 on successful decryption completion.
19501950
\return BAD_FUNC_ARG if input arguments are invalid.
1951-
\param aes pointer to the Aes structure holding the context of the operation.
1951+
\param [in] aes pointer to the Aes structure holding the context of the operation.
19521952
\param[out] out buffer to hold the final decrypted plaintext. Must be large
19531953
enough to store any remaining plaintext from this final step.
19541954
\param[out] outSz size in bytes of the output data written to the \c out buffer.

doc/dox_comments/header_files/asn_public.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
\sa wc_MakeCert
2020
\sa wc_MakeCertReq
2121
*/
22-
int wc_InitCert(Cert*);
22+
int wc_InitCert(Cert* cert);
2323

2424
/*!
2525
\ingroup ASN
@@ -2524,4 +2524,3 @@ int wc_Asn1_SetFile(Asn1* asn1, XFILE file);
25242524
*/
25252525
int wc_Asn1_PrintAll(Asn1* asn1, Asn1PrintOptions* opts, unsigned char* data,
25262526
word32 len);
2527-

doc/dox_comments/header_files/camellia.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
\sa wc_CamelliaCbcEncrypt
3636
\sa wc_CamelliaCbcDecrypt
3737
*/
38-
int wc_CamelliaSetKey(Camellia* cam,
39-
const byte* key, word32 len, const byte* iv);
38+
int wc_CamelliaSetKey(wc_Camellia* cam, const byte* key, word32 len,
39+
const byte* iv);
4040

4141
/*!
4242
\ingroup Camellia
@@ -64,7 +64,7 @@ int wc_CamelliaSetKey(Camellia* cam,
6464
6565
\sa wc_CamelliaSetKey
6666
*/
67-
int wc_CamelliaSetIV(Camellia* cam, const byte* iv);
67+
int wc_CamelliaSetIV(wc_Camellia* cam, const byte* iv);
6868

6969
/*!
7070
\ingroup Camellia
@@ -92,7 +92,7 @@ int wc_CamelliaSetIV(Camellia* cam, const byte* iv);
9292
9393
\sa wc_CamelliaDecryptDirect
9494
*/
95-
int wc_CamelliaEncryptDirect(Camellia* cam, byte* out,
95+
int wc_CamelliaEncryptDirect(wc_Camellia* cam, byte* out,
9696
const byte* in);
9797

9898
/*!
@@ -122,7 +122,7 @@ int wc_CamelliaEncryptDirect(Camellia* cam, byte* out,
122122
123123
\sa wc_CamelliaEncryptDirect
124124
*/
125-
int wc_CamelliaDecryptDirect(Camellia* cam, byte* out,
125+
int wc_CamelliaDecryptDirect(wc_Camellia* cam, byte* out,
126126
const byte* in);
127127

128128
/*!
@@ -151,7 +151,7 @@ int wc_CamelliaDecryptDirect(Camellia* cam, byte* out,
151151
152152
\sa wc_CamelliaCbcDecrypt
153153
*/
154-
int wc_CamelliaCbcEncrypt(Camellia* cam,
154+
int wc_CamelliaCbcEncrypt(wc_Camellia* cam,
155155
byte* out, const byte* in, word32 sz);
156156

157157
/*!
@@ -180,5 +180,5 @@ int wc_CamelliaCbcEncrypt(Camellia* cam,
180180
181181
\sa wc_CamelliaCbcEncrypt
182182
*/
183-
int wc_CamelliaCbcDecrypt(Camellia* cam,
183+
int wc_CamelliaCbcDecrypt(wc_Camellia* cam,
184184
byte* out, const byte* in, word32 sz);

doc/dox_comments/header_files/chacha20_poly1305.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
int wc_ChaCha20Poly1305_Encrypt(
5151
const byte inKey[CHACHA20_POLY1305_AEAD_KEYSIZE],
5252
const byte inIV[CHACHA20_POLY1305_AEAD_IV_SIZE],
53-
const byte* inAAD, const word32 inAADLen,
54-
const byte* inPlaintext, const word32 inPlaintextLen,
53+
const byte* inAAD, word32 inAADLen,
54+
const byte* inPlaintext, word32 inPlaintextLen,
5555
byte* outCiphertext,
5656
byte outAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]);
5757

@@ -118,7 +118,7 @@ int wc_ChaCha20Poly1305_Encrypt(
118118
int wc_ChaCha20Poly1305_Decrypt(
119119
const byte inKey[CHACHA20_POLY1305_AEAD_KEYSIZE],
120120
const byte inIV[CHACHA20_POLY1305_AEAD_IV_SIZE],
121-
const byte* inAAD, const word32 inAADLen,
122-
const byte* inCiphertext, const word32 inCiphertextLen,
121+
const byte* inAAD, word32 inAADLen,
122+
const byte* inCiphertext, word32 inCiphertextLen,
123123
const byte inAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE],
124124
byte* outPlaintext);

doc/dox_comments/header_files/curve25519.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ int wc_curve25519_shared_secret(curve25519_key* private_key,
108108
the received public key.
109109
\param [out] out Pointer to a buffer in which to store the 32 byte computed
110110
secret key.
111-
\param pin,out] outlen Pointer in which to store the length written to the
111+
\param [in,out] outlen Pointer in which to store the length written to the
112112
output buffer.
113113
\param [in] endian EC25519_BIG_ENDIAN or EC25519_LITTLE_ENDIAN to set which
114114
form to use.
@@ -537,7 +537,7 @@ int wc_curve25519_import_public_ex(const byte* in, word32 inLen,
537537
\return BAD_FUNC_ARG Returned if any of the input parameters are NULL.
538538
539539
\param [in] pub Pointer to the buffer containing the public key to check.
540-
\param [in] pubLen Length of the public key to check.
540+
\param [in] pubSz Length of the public key to check.
541541
\param [in] endian EC25519_BIG_ENDIAN or EC25519_LITTLE_ENDIAN to set which
542542
form to use.
543543

doc/dox_comments/header_files/curve448.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ int wc_curve448_import_public_ex(const byte* in, word32 inLen,
533533
\return BAD_FUNC_ARG Returned if any of the input parameters are NULL.
534534
535535
\param [in] pub Pointer to the buffer containing the public key to check.
536-
\param [in] pubLen Length of the public key to check.
536+
\param [in] pubSz Length of the public key to check.
537537
\param [in] endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to set which
538538
form to use.
539539

doc/dox_comments/header_files/dh.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int wc_InitDhKey(DhKey* key);
4040
4141
\sa wc_InitDhKey
4242
*/
43-
void wc_FreeDhKey(DhKey* key);
43+
int wc_FreeDhKey(DhKey* key);
4444

4545
/*!
4646
\ingroup Diffie-Hellman
@@ -185,7 +185,7 @@ int wc_DhAgree(DhKey* key, byte* agree, word32* agreeSz,
185185
\sa wc_DhSetKey
186186
*/
187187
int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key,
188-
word32);
188+
word32 inSz);
189189

190190
/*!
191191
\ingroup Diffie-Hellman
@@ -396,5 +396,5 @@ int wc_DhSetKey_ex(DhKey* key, const byte* p, word32 pSz,
396396

397397
/*!
398398
\ingroup Diffie-Hellman
399-
*/
399+
*/
400400
int wc_FreeDhKey(DhKey* key);

0 commit comments

Comments
 (0)