Skip to content

Commit 42e324e

Browse files
committed
[JA] Fix issues with the API documentation
1 parent a103f5a commit 42e324e

File tree

27 files changed

+317
-296
lines changed

27 files changed

+317
-296
lines changed

doc/dox_comments/header_files-ja/aes.h

Lines changed: 69 additions & 69 deletions
Large diffs are not rendered by default.

doc/dox_comments/header_files-ja/asn_public.h

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

doc/dox_comments/header_files-ja/camellia.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
\sa wc_CamelliaCbcEncrypt
3030
\sa wc_CamelliaCbcDecrypt
3131
*/
32-
int wc_CamelliaSetKey(Camellia* cam,
33-
const byte* key, word32 len, const byte* iv);
32+
int wc_CamelliaSetKey(wc_Camellia* cam, const byte* key, word32 len,
33+
const byte* iv);
3434

3535
/*!
3636
\ingroup Camellia
@@ -55,7 +55,7 @@ int wc_CamelliaSetKey(Camellia* cam,
5555
5656
\sa wc_CamelliaSetKey
5757
*/
58-
int wc_CamelliaSetIV(Camellia* cam, const byte* iv);
58+
int wc_CamelliaSetIV(wc_Camellia* cam, const byte* iv);
5959

6060
/*!
6161
\ingroup Camellia
@@ -80,7 +80,7 @@ int wc_CamelliaSetIV(Camellia* cam, const byte* iv);
8080
8181
\sa wc_CamelliaDecryptDirect
8282
*/
83-
int wc_CamelliaEncryptDirect(Camellia* cam, byte* out,
83+
int wc_CamelliaEncryptDirect(wc_Camellia* cam, byte* out,
8484
const byte* in);
8585

8686
/*!
@@ -106,7 +106,7 @@ int wc_CamelliaEncryptDirect(Camellia* cam, byte* out,
106106
107107
\sa wc_CamelliaEncryptDirect
108108
*/
109-
int wc_CamelliaDecryptDirect(Camellia* cam, byte* out,
109+
int wc_CamelliaDecryptDirect(wc_Camellia* cam, byte* out,
110110
const byte* in);
111111

112112
/*!
@@ -133,7 +133,7 @@ int wc_CamelliaDecryptDirect(Camellia* cam, byte* out,
133133
134134
\sa wc_CamelliaCbcDecrypt
135135
*/
136-
int wc_CamelliaCbcEncrypt(Camellia* cam,
136+
int wc_CamelliaCbcEncrypt(wc_Camellia* cam,
137137
byte* out, const byte* in, word32 sz);
138138

139139
/*!
@@ -160,5 +160,5 @@ int wc_CamelliaCbcEncrypt(Camellia* cam,
160160
161161
\sa wc_CamelliaCbcEncrypt
162162
*/
163-
int wc_CamelliaCbcDecrypt(Camellia* cam,
163+
int wc_CamelliaCbcDecrypt(wc_Camellia* cam,
164164
byte* out, const byte* in, word32 sz);

doc/dox_comments/header_files-ja/chacha20_poly1305.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
int wc_ChaCha20Poly1305_Encrypt(
4242
const byte inKey[CHACHA20_POLY1305_AEAD_KEYSIZE],
4343
const byte inIV[CHACHA20_POLY1305_AEAD_IV_SIZE],
44-
const byte* inAAD, const word32 inAADLen,
45-
const byte* inPlaintext, const word32 inPlaintextLen,
44+
const byte* inAAD, word32 inAADLen,
45+
const byte* inPlaintext, word32 inPlaintextLen,
4646
byte* outCiphertext,
4747
byte outAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]);
4848

@@ -95,7 +95,7 @@ int wc_ChaCha20Poly1305_Encrypt(
9595
int wc_ChaCha20Poly1305_Decrypt(
9696
const byte inKey[CHACHA20_POLY1305_AEAD_KEYSIZE],
9797
const byte inIV[CHACHA20_POLY1305_AEAD_IV_SIZE],
98-
const byte* inAAD, const word32 inAADLen,
99-
const byte* inCiphertext, const word32 inCiphertextLen,
98+
const byte* inAAD, word32 inAADLen,
99+
const byte* inCiphertext, word32 inCiphertextLen,
100100
const byte inAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE],
101101
byte* outPlaintext);

doc/dox_comments/header_files-ja/curve25519.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ int wc_curve25519_import_public_ex(const byte* in, word32 inLen,
482482
\return BAD_FUNC_ARG 入力パラメータのいずれかがNULLの場合に返されます。
483483
484484
\param [in] pub チェックする公開鍵を含むバッファへのポインタ。
485-
\param [in] pubLen チェックする公開鍵の長さ。
485+
\param [in] pubSz チェックする公開鍵の長さ。
486486
\param [in] endian 使用する形式を設定するためのEC25519_BIG_ENDIANまたはEC25519_LITTLE_ENDIAN。
487487
488488
_Example_

doc/dox_comments/header_files-ja/curve448.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ int wc_curve448_import_public_ex(const byte* in, word32 inLen,
480480
\return BAD_FUNC_ARG 入力パラメータのいずれかがNULLの場合に返されます。
481481
482482
\param [in] pub チェックする公開鍵を含むバッファへのポインタ。
483-
\param [in] pubLen チェックする公開鍵の長さ。
483+
\param [in] pubSz チェックする公開鍵の長さ。
484484
\param [in] endian 使用する形式を設定するためのEC448_BIG_ENDIANまたはEC448_LITTLE_ENDIAN。
485485
486486
_Example_

doc/dox_comments/header_files-ja/dh.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int wc_InitDhKey(DhKey* key);
3737
3838
\sa wc_InitDhKey
3939
*/
40-
void wc_FreeDhKey(DhKey* key);
40+
int wc_FreeDhKey(DhKey* key);
4141

4242
/*!
4343
\ingroup Diffie-Hellman
@@ -155,7 +155,7 @@ int wc_DhAgree(DhKey* key, byte* agree, word32* agreeSz,
155155
\sa wc_DhSetKey
156156
*/
157157
int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key,
158-
word32);
158+
word32 inSz);
159159

160160
/*!
161161
\ingroup Diffie-Hellman

doc/dox_comments/header_files-ja/ecc.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ void wc_ecc_del_point(ecc_point* p);
733733
\sa wc_ecc_del_point
734734
*/
735735

736-
int wc_ecc_copy_point(ecc_point* p, ecc_point *r);
736+
int wc_ecc_copy_point(const ecc_point* p, ecc_point *r);
737737

738738
/*!
739739
\ingroup ECC
@@ -847,7 +847,7 @@ int wc_ecc_point_is_at_infinity(ecc_point *p);
847847
\sa なし
848848
*/
849849

850-
int wc_ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R,
850+
int wc_ecc_mulmod(const mp_int* k, ecc_point *G, ecc_point *R,
851851
mp_int* a, mp_int* modulus, int map);
852852

853853
/*!
@@ -1020,7 +1020,7 @@ int wc_ecc_import_x963(const byte* in, word32 inLen, ecc_key* key);
10201020
\param privSz 秘密鍵バッファのサイズ
10211021
\param pub ANSI x9.63形式のECC公開鍵を含むバッファへのポインタ
10221022
\param pubSz 公開鍵入力バッファの長さ
1023-
\param key インポートされた秘密/公開キーペアを格納するecc_keyオブジェクトへのポインタ
1023+
\param key インポートされた秘密/公開鍵ペアを格納するecc_keyオブジェクトへのポインタ
10241024
10251025
_Example_
10261026
\code
@@ -1241,7 +1241,7 @@ int wc_ecc_export_point_der(const int curve_idx, ecc_point* point,
12411241
\sa wc_ecc_export_point_der
12421242
*/
12431243

1244-
int wc_ecc_import_point_der(byte* in, word32 inLen, const int curve_idx,
1244+
int wc_ecc_import_point_der(const byte* in, word32 inLen, const int curve_idx,
12451245
ecc_point* point);
12461246

12471247
/*!
@@ -1319,7 +1319,7 @@ int wc_ecc_sig_size_calc(int sz);
13191319
\sa wc_ecc_sig_size_calc
13201320
*/
13211321

1322-
int wc_ecc_sig_size(ecc_key* key);
1322+
int wc_ecc_sig_size(const ecc_key* key);
13231323

13241324

13251325
/*!
@@ -1375,7 +1375,7 @@ ecEncCtx* wc_ecc_ctx_new(int flags, WC_RNG* rng);
13751375
\sa wc_ecc_ctx_new
13761376
*/
13771377

1378-
void wc_ecc_ctx_free(ecEncCtx*);
1378+
void wc_ecc_ctx_free(ecEncCtx* ctx);
13791379

13801380
/*!
13811381
\ingroup ECC

doc/dox_comments/header_files-ja/ed25519.h

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ int wc_ed25519ctx_sign_msg(const byte* in, word32 inlen, byte* out,
173173
\param [in] hash 署名するメッセージのハッシュを含むバッファへのポインタ。
174174
\param [in] hashLen 署名するメッセージのハッシュの長さ。
175175
\param [out] out 生成された署名を格納するバッファ。
176-
\param [in,out] outlen 出力バッファの最大長。メッセージ署名の生成に成功した後、outに書き込まれたバイト数が格納されます。
176+
\param [in,out] outLen 出力バッファの最大長。メッセージ署名の生成に成功した後、outに書き込まれたバイト数が格納されます。
177177
\param [in] key 署名を生成するために使用する秘密ed25519_keyへのポインタ。
178178
\param [in] context メッセージが署名されているコンテキストを含むバッファへのポインタ。
179179
\param [in] contextLen コンテキストバッファの長さ。
@@ -373,8 +373,8 @@ int wc_ed25519ctx_verify_msg(const byte* sig, word32 siglen, const byte* msg,
373373
byte hash[] = { メッセージのSHA-512ハッシュで初期化 };
374374
byte context[] = { 署名のコンテキストで初期化 };
375375
// 受信した公開鍵でkeyを初期化
376-
ret = wc_ed25519ph_verify_hash(sig, sizeof(sig), msg, sizeof(msg),
377-
&verified, &key, );
376+
ret = wc_ed25519ph_verify_hash(sig, sizeof(sig), hash, sizeof(hash),
377+
&verified, &key, context, sizeof(context));
378378
if (ret < 0) {
379379
// 検証実行エラー
380380
} else if (verified == 0)
@@ -419,8 +419,8 @@ int wc_ed25519ph_verify_hash(const byte* sig, word32 siglen, const byte* hash,
419419
byte msg[] = { メッセージで初期化 };
420420
byte context[] = { 署名のコンテキストで初期化 };
421421
// 受信した公開鍵でkeyを初期化
422-
ret = wc_ed25519ctx_verify_msg(sig, sizeof(sig), msg, sizeof(msg),
423-
&verified, &key, );
422+
ret = wc_ed25519ph_verify_msg(sig, sizeof(sig), msg, sizeof(msg),
423+
&verified, &key, context, sizeof(context));
424424
if (ret < 0) {
425425
// 検証実行エラー
426426
} else if (verified == 0)
@@ -429,8 +429,8 @@ int wc_ed25519ph_verify_hash(const byte* sig, word32 siglen, const byte* hash,
429429
\endcode
430430
431431
\sa wc_ed25519_verify_msg
432+
\sa wc_ed25519ctx_verify_msg
432433
\sa wc_ed25519ph_verify_hash
433-
\sa wc_ed25519ph_verify_msg
434434
\sa wc_ed25519_sign_msg
435435
*/
436436

@@ -645,7 +645,7 @@ int wc_ed25519_import_private_key(const byte* priv, word32 privSz,
645645
646646
ed25519_key key;
647647
wc_ed25519_init_key(&key);
648-
ret = wc_ed25519_import_private_key(priv, sizeof(priv), pub, sizeof(pub),
648+
ret = wc_ed25519_import_private_key_ex(priv, sizeof(priv), pub, sizeof(pub),
649649
&key, 1);
650650
if (ret != 0) {
651651
// 鍵のインポートエラー
@@ -669,7 +669,7 @@ int wc_ed25519_import_private_key_ex(const byte* priv, word32 privSz,
669669
670670
\return 0 公開鍵のエクスポートに成功した場合に返されます。
671671
\return BAD_FUNC_ARG 入力値のいずれかがNULLと評価された場合に返されます。
672-
\return BUFFER_E 提供されたバッファが秘密鍵を格納するのに十分な大きさでない場合に返されます。このエラーを返す際、関数はoutLenに必要なサイズを設定します。
672+
\return BUFFER_E 提供されたバッファが公開鍵を格納するのに十分な大きさでない場合に返されます。このエラーを返す際、関数はoutLenに必要なサイズを設定します。
673673
674674
\param [in] key 公開鍵をエクスポートするed25519_key構造体へのポインタ。
675675
\param [out] out 公開鍵を格納するバッファへのポインタ。
@@ -692,10 +692,11 @@ int wc_ed25519_import_private_key_ex(const byte* priv, word32 privSz,
692692
693693
\sa wc_ed25519_import_public
694694
\sa wc_ed25519_import_public_ex
695+
\sa wc_ed25519_export_private
695696
\sa wc_ed25519_export_private_only
696697
*/
697698

698-
int wc_ed25519_export_public(ed25519_key* key, byte* out, word32* outLen);
699+
int wc_ed25519_export_public(const ed25519_key* key, byte* out, word32* outLen);
699700

700701
/*!
701702
\ingroup ED25519
@@ -725,11 +726,12 @@ int wc_ed25519_export_public(ed25519_key* key, byte* out, word32* outLen);
725726
\endcode
726727
727728
\sa wc_ed25519_export_public
729+
\sa wc_ed25519_export_private
728730
\sa wc_ed25519_import_private_key
729731
\sa wc_ed25519_import_private_key_ex
730732
*/
731733

732-
int wc_ed25519_export_private_only(ed25519_key* key, byte* out, word32* outLen);
734+
int wc_ed25519_export_private_only(const ed25519_key* key, byte* out, word32* outLen);
733735

734736
/*!
735737
\ingroup ED25519
@@ -767,7 +769,7 @@ int wc_ed25519_export_private_only(ed25519_key* key, byte* out, word32* outLen);
767769
\sa wc_ed25519_export_private_only
768770
*/
769771

770-
int wc_ed25519_export_private(ed25519_key* key, byte* out, word32* outLen);
772+
int wc_ed25519_export_private(const ed25519_key* key, byte* out, word32* outLen);
771773

772774
/*!
773775
\ingroup ED25519
@@ -805,7 +807,7 @@ int wc_ed25519_export_private(ed25519_key* key, byte* out, word32* outLen);
805807
\sa wc_ed25519_export_public
806808
*/
807809

808-
int wc_ed25519_export_key(ed25519_key* key,
810+
int wc_ed25519_export_key(const ed25519_key* key,
809811
byte* priv, word32 *privSz,
810812
byte* pub, word32 *pubSz);
811813

@@ -866,7 +868,7 @@ int wc_ed25519_check_key(ed25519_key* key);
866868
\sa wc_ed25519_make_key
867869
*/
868870

869-
int wc_ed25519_size(ed25519_key* key);
871+
int wc_ed25519_size(const ed25519_key* key);
870872

871873
/*!
872874
\ingroup ED25519
@@ -893,7 +895,7 @@ int wc_ed25519_size(ed25519_key* key);
893895
\sa wc_ed25519_pub_size
894896
*/
895897

896-
int wc_ed25519_priv_size(ed25519_key* key);
898+
int wc_ed25519_priv_size(const ed25519_key* key);
897899

898900
/*!
899901
\ingroup ED25519
@@ -919,7 +921,7 @@ int wc_ed25519_priv_size(ed25519_key* key);
919921
\sa wc_ed25519_priv_size
920922
*/
921923

922-
int wc_ed25519_pub_size(ed25519_key* key);
924+
int wc_ed25519_pub_size(const ed25519_key* key);
923925

924926
/*!
925927
\ingroup ED25519
@@ -946,4 +948,4 @@ int wc_ed25519_pub_size(ed25519_key* key);
946948
\sa wc_ed25519_sign_msg
947949
*/
948950

949-
int wc_ed25519_sig_size(ed25519_key* key);
951+
int wc_ed25519_sig_size(const ed25519_key* key);

0 commit comments

Comments
 (0)