mirror of https://github.com/wolfSSL/wolfssl.git
Doc typo fix
parent
3591ce773c
commit
92c7faafb7
|
@ -170,7 +170,7 @@ int wc_DsaPrivateKeyDecode(const byte* input, word32* inOutIdx,
|
|||
_Example_
|
||||
\code
|
||||
DsaKey key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int derSz;
|
||||
int bufferSize = // Sufficient buffer size;
|
||||
byte der[bufferSize];
|
||||
|
@ -196,7 +196,7 @@ int wc_DsaKeyToDer(DsaKey* key, byte* output, word32 inLen);
|
|||
\param rng WC_RNG構造体へのポインタ。
|
||||
_Example_
|
||||
\code
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
DsaKey dsa;
|
||||
wc_InitRng(&rng);
|
||||
wc_InitDsa(&dsa);
|
||||
|
@ -222,7 +222,7 @@ int wc_MakeDsaKey(WC_RNG *rng, DsaKey *dsa);
|
|||
_Example_
|
||||
\code
|
||||
DsaKey key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitDsaKey(&key);
|
||||
wc_InitRng(&rng);
|
||||
if(wc_MakeDsaParameters(&rng, 1024, &genKey) != 0)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
\code
|
||||
ecc_key key;
|
||||
wc_ecc_init(&key);
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
wc_ecc_make_key(&rng, 32, &key); // initialize 32 byte ecc key
|
||||
\endcode
|
||||
|
@ -57,7 +57,7 @@ int wc_ecc_make_key(WC_RNG* rng, int keysize, ecc_key* key);
|
|||
\code
|
||||
ecc_key key;
|
||||
int ret;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_ecc_init(&key);
|
||||
wc_InitRng(&rng);
|
||||
int curveId = ECC_SECP521R1;
|
||||
|
@ -83,7 +83,7 @@ int wc_ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key, int curve_id);
|
|||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int check_result;
|
||||
wc_ecc_init(&key);
|
||||
wc_InitRng(&rng);
|
||||
|
@ -144,7 +144,7 @@ void wc_ecc_key_free(ecc_key* key);
|
|||
_Example_
|
||||
\code
|
||||
ecc_key priv, pub;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
byte secret[1024]; // can hold 1024 byte shared secret key
|
||||
word32 secretSz = sizeof(secret);
|
||||
int ret;
|
||||
|
@ -228,7 +228,7 @@ int wc_ecc_shared_secret_ex(ecc_key* private_key, ecc_point* point,
|
|||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int ret, sigSz;
|
||||
|
||||
byte sig[512]; // will hold generated signature
|
||||
|
@ -273,7 +273,7 @@ int wc_ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen,
|
|||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
WC_WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int ret, sigSz;
|
||||
mp_int r; // destination for r component of signature.
|
||||
mp_int s; // destination for s component of signature.
|
||||
|
@ -463,7 +463,7 @@ void wc_ecc_fp_free(void);
|
|||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int is_valid;
|
||||
wc_ecc_init(&key);
|
||||
wc_InitRng(&rng);
|
||||
|
@ -1057,7 +1057,7 @@ int wc_ecc_sig_size(ecc_key* key);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* ctx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
ctx = wc_ecc_ctx_new(REQ_RESP_CLIENT, &rng);
|
||||
if(ctx == NULL) {
|
||||
|
@ -1078,7 +1078,7 @@ ecEncCtx* wc_ecc_ctx_new(int flags, WC_RNG* rng);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* ctx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
ctx = wc_ecc_ctx_new(REQ_RESP_CLIENT, &rng);
|
||||
// do secure communication
|
||||
|
@ -1100,7 +1100,7 @@ void wc_ecc_ctx_free(ecEncCtx*);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* ctx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
ctx = wc_ecc_ctx_new(REQ_RESP_CLIENT, &rng);
|
||||
// do secure communication
|
||||
|
@ -1143,7 +1143,7 @@ int wc_ecc_ctx_set_algo(ecEncCtx* ctx, byte encAlgo, byte kdfAlgo,
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* ctx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
const byte* salt;
|
||||
wc_InitRng(&rng);
|
||||
ctx = wc_ecc_ctx_new(REQ_RESP_CLIENT, &rng);
|
||||
|
@ -1168,7 +1168,7 @@ const byte* wc_ecc_ctx_get_own_salt(ecEncCtx*);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* cliCtx, srvCtx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
const byte* cliSalt, srvSalt;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ int wc_RsaSSL_Sign(const byte* in, word32 inLen, byte* out,
|
|||
_Example_
|
||||
\code
|
||||
RsaKey key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int ret = 0;
|
||||
long e = 65537; // standard value to use for exponent
|
||||
wc_InitRsaKey(&key, NULL); // not using heap hint. No custom memory
|
||||
|
@ -869,7 +869,7 @@ int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz,
|
|||
// Allocate memory for der
|
||||
int derSz = // Amount of memory allocated for der;
|
||||
RsaKey key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
long e = 65537; // standard value to use for exponent
|
||||
ret = wc_MakeRsaKey(&key, 2048, e, &rng); // generate 2048 bit long
|
||||
private key
|
||||
|
@ -904,7 +904,7 @@ int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen);
|
|||
\param label 暗号化されたメッセージに関連付けるオプションのラベル
|
||||
_Example_
|
||||
\code
|
||||
WC_WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
RsaKey key;
|
||||
byte in[] = “I use Turing Machines to ask questions”
|
||||
byte out[256];
|
||||
|
@ -941,7 +941,7 @@ int wc_RsaPublicEncrypt_ex(const byte* in, word32 inLen, byte* out,
|
|||
\param label 暗号化されたメッセージに関連付けるオプションのラベル
|
||||
_Example_
|
||||
\code
|
||||
WC_WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
RsaKey key;
|
||||
byte in[] = “I use Turing Machines to ask questions”
|
||||
byte out[256];
|
||||
|
@ -985,7 +985,7 @@ int wc_RsaPrivateDecrypt_ex(const byte* in, word32 inLen,
|
|||
\param label 暗号化されたメッセージに関連付けるオプションのラベル
|
||||
_Example_
|
||||
\code
|
||||
WC_WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
RsaKey key;
|
||||
byte in[] = “I use Turing Machines to ask questions”
|
||||
byte out[256];
|
||||
|
@ -1126,7 +1126,7 @@ int wc_RsaKeyToPublicDer_ex(RsaKey* key, byte* output, word32 inLen,
|
|||
_Example_
|
||||
\code
|
||||
RsaKey priv;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int ret = 0;
|
||||
long e = 65537; // standard value to use for exponent
|
||||
|
||||
|
|
|
@ -1494,7 +1494,7 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
|
|||
\code
|
||||
ecc_key key;
|
||||
wc_ecc_init(&key);
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
wc_ecc_make_key(&rng, 32, &key);
|
||||
int derSz = // Some appropriate size for der;
|
||||
|
@ -1538,7 +1538,7 @@ int wc_EccPublicKeyToDer(ecc_key* key, byte* output,
|
|||
\code
|
||||
ecc_key key;
|
||||
wc_ecc_init(&key);
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
wc_ecc_make_key(&rng, 32, &key);
|
||||
int derSz = // Some appropriate size for der;
|
||||
|
|
|
@ -261,7 +261,7 @@ int wc_DsaPrivateKeyDecode(const byte* input, word32* inOutIdx,
|
|||
_Example_
|
||||
\code
|
||||
DsaKey key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int derSz;
|
||||
int bufferSize = // Sufficient buffer size;
|
||||
byte der[bufferSize];
|
||||
|
@ -293,7 +293,7 @@ int wc_DsaKeyToDer(DsaKey* key, byte* output, word32 inLen);
|
|||
|
||||
_Example_
|
||||
\code
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
DsaKey dsa;
|
||||
wc_InitRng(&rng);
|
||||
wc_InitDsa(&dsa);
|
||||
|
@ -326,7 +326,7 @@ int wc_MakeDsaKey(WC_RNG *rng, DsaKey *dsa);
|
|||
_Example_
|
||||
\code
|
||||
DsaKey key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitDsaKey(&key);
|
||||
wc_InitRng(&rng);
|
||||
if(wc_MakeDsaParameters(&rng, 1024, &genKey) != 0)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
\code
|
||||
ecc_key key;
|
||||
wc_ecc_init(&key);
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
wc_ecc_make_key(&rng, 32, &key); // initialize 32 byte ecc key
|
||||
\endcode
|
||||
|
@ -95,7 +95,7 @@ int wc_ecc_make_key(WC_RNG* rng, int keysize, ecc_key* key);
|
|||
\code
|
||||
ecc_key key;
|
||||
int ret;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_ecc_init(&key);
|
||||
wc_InitRng(&rng);
|
||||
int curveId = ECC_SECP521R1;
|
||||
|
@ -127,7 +127,7 @@ int wc_ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key, int curve_id);
|
|||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int check_result;
|
||||
wc_ecc_init(&key);
|
||||
wc_InitRng(&rng);
|
||||
|
@ -223,7 +223,7 @@ void wc_ecc_key_free(ecc_key* key);
|
|||
_Example_
|
||||
\code
|
||||
ecc_key priv, pub;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
byte secret[1024]; // can hold 1024 byte shared secret key
|
||||
word32 secretSz = sizeof(secret);
|
||||
int ret;
|
||||
|
@ -340,7 +340,7 @@ int wc_ecc_shared_secret_ex(ecc_key* private_key, ecc_point* point,
|
|||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int ret, sigSz;
|
||||
|
||||
byte sig[512]; // will hold generated signature
|
||||
|
@ -406,7 +406,7 @@ int wc_ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen,
|
|||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
WC_WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int ret, sigSz;
|
||||
mp_int r; // destination for r component of signature.
|
||||
mp_int s; // destination for s component of signature.
|
||||
|
@ -670,7 +670,7 @@ void wc_ecc_fp_free(void);
|
|||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int is_valid;
|
||||
wc_ecc_init(&key);
|
||||
wc_InitRng(&rng);
|
||||
|
@ -1531,7 +1531,7 @@ int wc_ecc_sig_size(ecc_key* key);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* ctx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
ctx = wc_ecc_ctx_new(REQ_RESP_CLIENT, &rng);
|
||||
if(ctx == NULL) {
|
||||
|
@ -1559,7 +1559,7 @@ ecEncCtx* wc_ecc_ctx_new(int flags, WC_RNG* rng);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* ctx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
ctx = wc_ecc_ctx_new(REQ_RESP_CLIENT, &rng);
|
||||
// do secure communication
|
||||
|
@ -1589,7 +1589,7 @@ void wc_ecc_ctx_free(ecEncCtx*);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* ctx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
wc_InitRng(&rng);
|
||||
ctx = wc_ecc_ctx_new(REQ_RESP_CLIENT, &rng);
|
||||
// do secure communication
|
||||
|
@ -1653,7 +1653,7 @@ int wc_ecc_ctx_set_algo(ecEncCtx* ctx, byte encAlgo, byte kdfAlgo,
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* ctx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
const byte* salt;
|
||||
wc_InitRng(&rng);
|
||||
ctx = wc_ecc_ctx_new(REQ_RESP_CLIENT, &rng);
|
||||
|
@ -1690,7 +1690,7 @@ const byte* wc_ecc_ctx_get_own_salt(ecEncCtx*);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* cliCtx, srvCtx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
const byte* cliSalt, srvSalt;
|
||||
int ret;
|
||||
|
||||
|
@ -1727,7 +1727,7 @@ int wc_ecc_ctx_set_peer_salt(ecEncCtx* ctx, const byte* salt);
|
|||
_Example_
|
||||
\code
|
||||
ecEncCtx* srvCtx;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
byte cliSalt[] = { fixed salt data };
|
||||
word32 cliSaltLen = (word32)sizeof(cliSalt);
|
||||
int ret;
|
||||
|
|
|
@ -314,7 +314,7 @@ int wc_RsaSSL_Sign(const byte* in, word32 inLen, byte* out,
|
|||
_Example_
|
||||
\code
|
||||
RsaKey key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int ret = 0;
|
||||
long e = 65537; // standard value to use for exponent
|
||||
wc_InitRsaKey(&key, NULL); // not using heap hint. No custom memory
|
||||
|
@ -1118,7 +1118,7 @@ int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz,
|
|||
// Allocate memory for der
|
||||
int derSz = // Amount of memory allocated for der;
|
||||
RsaKey key;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
long e = 65537; // standard value to use for exponent
|
||||
ret = wc_MakeRsaKey(&key, 2048, e, &rng); // generate 2048 bit long
|
||||
private key
|
||||
|
@ -1161,7 +1161,7 @@ int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen);
|
|||
|
||||
_Example_
|
||||
\code
|
||||
WC_WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
RsaKey key;
|
||||
byte in[] = “I use Turing Machines to ask questions”
|
||||
byte out[256];
|
||||
|
@ -1208,7 +1208,7 @@ int wc_RsaPublicEncrypt_ex(const byte* in, word32 inLen, byte* out,
|
|||
|
||||
_Example_
|
||||
\code
|
||||
WC_WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
RsaKey key;
|
||||
byte in[] = “I use Turing Machines to ask questions”
|
||||
byte out[256];
|
||||
|
@ -1265,7 +1265,7 @@ int wc_RsaPrivateDecrypt_ex(const byte* in, word32 inLen,
|
|||
|
||||
_Example_
|
||||
\code
|
||||
WC_WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
RsaKey key;
|
||||
byte in[] = “I use Turing Machines to ask questions”
|
||||
byte out[256];
|
||||
|
@ -1463,7 +1463,7 @@ int wc_RsaKeyToPublicDer_ex(RsaKey* key, byte* output, word32 inLen,
|
|||
_Example_
|
||||
\code
|
||||
RsaKey priv;
|
||||
WC_WC_RNG rng;
|
||||
WC_RNG rng;
|
||||
int ret = 0;
|
||||
long e = 65537; // standard value to use for exponent
|
||||
|
||||
|
|
Loading…
Reference in New Issue