Fix the wc_EccPublicKeyToDer_ex doxy.

This commit is contained in:
David Garske
2022-07-06 07:58:18 -07:00
parent 9b085a44be
commit a171bebba4

View File

@ -1416,8 +1416,8 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
\brief This function converts the ECC public key to DER format. It \brief This function converts the ECC public key to DER format. It
returns the size of buffer used. The public ECC key in DER format is stored returns the size of buffer used. The public ECC key in DER format is stored
in output buffer. with_AlgCurve is a flag for when to include a header that in output buffer. The with_AlgCurve flag will include a header that
has the Algorithm and Curve information. has the Algorithm and Curve information
\return >0 Success, size of buffer used \return >0 Success, size of buffer used
\return BAD_FUNC_ARG Returned if output or key is null. \return BAD_FUNC_ARG Returned if output or key is null.
@ -1436,7 +1436,7 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
wc_ecc_init(&key); wc_ecc_init(&key);
WC_WC_RNG rng; WC_WC_RNG rng;
wc_InitRng(&rng); wc_InitRng(&rng);
wc_ecc_make_key(&rng, 24, &key); wc_ecc_make_key(&rng, 32, &key);
int derSz = // Some appropriate size for der; int derSz = // Some appropriate size for der;
byte der[derSz]; byte der[derSz];
@ -1457,8 +1457,9 @@ int wc_EccPublicKeyToDer(ecc_key* key, byte* output,
\brief This function converts the ECC public key to DER format. It \brief This function converts the ECC public key to DER format. It
returns the size of buffer used. The public ECC key in DER format is stored returns the size of buffer used. The public ECC key in DER format is stored
in output buffer. with_AlgCurve is a flag for when to include a header that in output buffer. The with_AlgCurve flag will include a header that
has the Algorithm and Curve information. The comp parameter has the Algorithm and Curve information. The comp parameter determines if
the public key will be exported as compressed.
\return >0 Success, size of buffer used \return >0 Success, size of buffer used
\return BAD_FUNC_ARG Returned if output or key is null. \return BAD_FUNC_ARG Returned if output or key is null.
@ -1470,8 +1471,8 @@ int wc_EccPublicKeyToDer(ecc_key* key, byte* output,
\param inLen Size of buffer. \param inLen Size of buffer.
\param with_AlgCurve a flag for when to include a header that has the \param with_AlgCurve a flag for when to include a header that has the
Algorithm and Curve information. Algorithm and Curve information.
\param comp Boolean value. If true the ECC public key will be written in \param comp If 1 (non-zero) the ECC public key will be written in
compressed form. If false it will be written in an uncompressed format. compressed form. If 0 it will be written in an uncompressed format.
_Example_ _Example_
\code \code
@ -1479,7 +1480,7 @@ int wc_EccPublicKeyToDer(ecc_key* key, byte* output,
wc_ecc_init(&key); wc_ecc_init(&key);
WC_WC_RNG rng; WC_WC_RNG rng;
wc_InitRng(&rng); wc_InitRng(&rng);
wc_ecc_make_key(&rng, 24, &key); wc_ecc_make_key(&rng, 32, &key);
int derSz = // Some appropriate size for der; int derSz = // Some appropriate size for der;
byte der[derSz]; byte der[derSz];