Skip to content

Commit 026fa2d

Browse files
committed
Fix issues with the API documentation
1 parent 59f4fa5 commit 026fa2d

24 files changed

Lines changed: 193 additions & 185 deletions

doc/dox_comments/header_files/aes.h

Lines changed: 1 addition & 1 deletion
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

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/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);

doc/dox_comments/header_files/ecc.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ void wc_ecc_del_point(ecc_point* p);
885885
\sa wc_ecc_del_point
886886
*/
887887

888-
int wc_ecc_copy_point(ecc_point* p, ecc_point *r);
888+
int wc_ecc_copy_point(const ecc_point* p, ecc_point *r);
889889

890890
/*!
891891
\ingroup ECC
@@ -1003,7 +1003,7 @@ int wc_ecc_point_is_at_infinity(ecc_point *p);
10031003
\sa none
10041004
*/
10051005

1006-
int wc_ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R,
1006+
int wc_ecc_mulmod(const mp_int* k, ecc_point *G, ecc_point *R,
10071007
mp_int* a, mp_int* modulus, int map);
10081008

10091009
/*!
@@ -1534,7 +1534,7 @@ int wc_ecc_export_point_der(const int curve_idx, ecc_point* point,
15341534
\sa wc_ecc_export_point_der
15351535
*/
15361536

1537-
int wc_ecc_import_point_der(byte* in, word32 inLen, const int curve_idx,
1537+
int wc_ecc_import_point_der(const byte* in, word32 inLen, const int curve_idx,
15381538
ecc_point* point);
15391539

15401540
/*!
@@ -1621,7 +1621,7 @@ int wc_ecc_sig_size_calc(int sz);
16211621
\sa wc_ecc_sig_size_calc
16221622
*/
16231623

1624-
int wc_ecc_sig_size(ecc_key* key);
1624+
int wc_ecc_sig_size(const ecc_key* key);
16251625

16261626

16271627
/*!
@@ -1681,7 +1681,7 @@ ecEncCtx* wc_ecc_ctx_new(int flags, WC_RNG* rng);
16811681
\sa wc_ecc_ctx_new
16821682
*/
16831683

1684-
void wc_ecc_ctx_free(ecEncCtx*);
1684+
void wc_ecc_ctx_free(ecEncCtx* ctx);
16851685

16861686
/*!
16871687
\ingroup ECC

doc/dox_comments/header_files/ed448.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ int wc_ed448_make_key(WC_RNG* rng, int keysize, ed448_key* key);
124124
\sa wc_ed448_verify_msg
125125
*/
126126

127-
int wc_ed448_sign_msg(const byte* in, word32 inlen, byte* out,
128-
word32 *outlen, ed448_key* key);
127+
int wc_ed448_sign_msg(const byte* in, word32 inLen, byte* out,
128+
word32 *outLen, ed448_key* key,
129+
const byte* context, byte contextLen);
129130

130131
/*!
131132
\ingroup ED448
@@ -685,7 +686,7 @@ int wc_ed448_import_private_key_ex(const byte* priv, word32 privSz,
685686
\sa wc_ed448_export_private_only
686687
*/
687688

688-
int wc_ed448_export_public(ed448_key* key, byte* out, word32* outLen);
689+
int wc_ed448_export_public(const ed448_key* key, byte* out, word32* outLen);
689690

690691
/*!
691692
\ingroup ED448
@@ -725,7 +726,8 @@ int wc_ed448_export_public(ed448_key* key, byte* out, word32* outLen);
725726
\sa wc_ed448_import_private_key_ex
726727
*/
727728

728-
int wc_ed448_export_private_only(ed448_key* key, byte* out, word32* outLen);
729+
int wc_ed448_export_private_only(const ed448_key* key, byte* out,
730+
word32* outLen);
729731

730732
/*!
731733
\ingroup ED448
@@ -768,7 +770,7 @@ int wc_ed448_export_private_only(ed448_key* key, byte* out, word32* outLen);
768770
\sa wc_ed448_export_private_only
769771
*/
770772

771-
int wc_ed448_export_private(ed448_key* key, byte* out, word32* outLen);
773+
int wc_ed448_export_private(const ed448_key* key, byte* out, word32* outLen);
772774

773775
/*!
774776
\ingroup ED448
@@ -815,7 +817,7 @@ int wc_ed448_export_private(ed448_key* key, byte* out, word32* outLen);
815817
\sa wc_ed448_export_public
816818
*/
817819

818-
int wc_ed448_export_key(ed448_key* key,
820+
int wc_ed448_export_key(const ed448_key* key,
819821
byte* priv, word32 *privSz,
820822
byte* pub, word32 *pubSz);
821823

@@ -879,7 +881,7 @@ int wc_ed448_check_key(ed448_key* key);
879881
\sa wc_ed448_make_key
880882
*/
881883

882-
int wc_ed448_size(ed448_key* key);
884+
int wc_ed448_size(const ed448_key* key);
883885

884886
/*!
885887
\ingroup ED448
@@ -908,7 +910,7 @@ int wc_ed448_size(ed448_key* key);
908910
\sa wc_ed448_pub_size
909911
*/
910912

911-
int wc_ed448_priv_size(ed448_key* key);
913+
int wc_ed448_priv_size(const ed448_key* key);
912914

913915
/*!
914916
\ingroup ED448
@@ -935,7 +937,7 @@ int wc_ed448_priv_size(ed448_key* key);
935937
\sa wc_ed448_priv_size
936938
*/
937939

938-
int wc_ed448_pub_size(ed448_key* key);
940+
int wc_ed448_pub_size(const ed448_key* key);
939941

940942
/*!
941943
\ingroup ED448
@@ -963,4 +965,4 @@ int wc_ed448_pub_size(ed448_key* key);
963965
\sa wc_ed448_sign_msg
964966
*/
965967

966-
int wc_ed448_sig_size(ed448_key* key);
968+
int wc_ed448_sig_size(const ed448_key* key);

doc/dox_comments/header_files/hash.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ int wc_Hash(enum wc_HashType hash_type,
9898
\param data the data to hash
9999
\param len the length of data
100100
\param hash Byte array to hold hash value.
101+
\param hashLen Number of bytes to write to hash.
101102
102103
_Example_
103104
\code
@@ -365,7 +366,8 @@ int wc_Sha3_512Hash(const byte* data, word32 len, byte* hash);
365366
\sa wc_Shake128_Update
366367
\sa wc_Shake128_Final
367368
*/
368-
int wc_Shake128Hash(const byte* data, word32 len, byte* hash);
369+
int wc_Shake128Hash(const byte* data, word32 len, byte* hash,
370+
word32 hashLen);
369371

370372
/*!
371373
\ingroup SHA
@@ -380,6 +382,7 @@ int wc_Shake128Hash(const byte* data, word32 len, byte* hash);
380382
\param data the data to hash
381383
\param len the length of data
382384
\param hash Byte array to hold hash value.
385+
\param hashLen Number of bytes to write to hash.
383386
384387
_Example_
385388
\code
@@ -390,7 +393,7 @@ int wc_Shake128Hash(const byte* data, word32 len, byte* hash);
390393
\sa wc_Shake256_Update
391394
\sa wc_Shake256_Final
392395
*/
393-
int wc_Shake256Hash(const byte* data, word32 len, byte* hash);
394-
396+
int wc_Shake256Hash(const byte* data, word32 len, byte* hash,
397+
word32 hashLen);
395398

396399

doc/dox_comments/header_files/md2.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
\sa wc_Md2Update
2525
\sa wc_Md2Final
2626
*/
27-
void wc_InitMd2(Md2*);
27+
void wc_InitMd2(wc_Md2* md2);
2828

2929
/*!
3030
\ingroup MD2
@@ -57,7 +57,7 @@ void wc_InitMd2(Md2*);
5757
\sa wc_Md2Final
5858
\sa wc_InitMd2
5959
*/
60-
void wc_Md2Update(Md2* md2, const byte* data, word32 len);
60+
void wc_Md2Update(wc_Md2* md2, const byte* data, word32 len);
6161

6262
/*!
6363
\ingroup MD2
@@ -88,7 +88,7 @@ void wc_Md2Update(Md2* md2, const byte* data, word32 len);
8888
\sa wc_Md2Final
8989
\sa wc_InitMd2
9090
*/
91-
void wc_Md2Final(Md2* md2, byte* hash);
91+
void wc_Md2Final(wc_Md2* md2, byte* hash);
9292

9393
/*!
9494
\ingroup MD2

doc/dox_comments/header_files/md4.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
\sa wc_Md4Update
2525
\sa wc_Md4Final
2626
*/
27-
void wc_InitMd4(Md4*);
27+
void wc_InitMd4(wc_Md4* md4);
2828

2929
/*!
3030
\ingroup MD4
@@ -57,7 +57,7 @@ void wc_InitMd4(Md4*);
5757
\sa wc_Md4Final
5858
\sa wc_InitMd4
5959
*/
60-
void wc_Md4Update(Md4* md4, const byte* data, word32 len);
60+
void wc_Md4Update(wc_Md4* md4, const byte* data, word32 len);
6161

6262
/*!
6363
\ingroup MD4
@@ -85,4 +85,4 @@ void wc_Md4Update(Md4* md4, const byte* data, word32 len);
8585
\sa wc_Md4Final
8686
\sa wc_InitMd4
8787
*/
88-
void wc_Md4Final(Md4* md4, byte* hash);
88+
void wc_Md4Final(wc_Md4* md4, byte* hash);

0 commit comments

Comments
 (0)