Files
wolfssl/doc/dox_comments/header_files-ja/coding.h

159 lines
7.9 KiB
C
Raw Normal View History

/*!
\ingroup Base_Encoding
\brief BASS64符号化入力INOUTに格納しますoutlen内の出力バッファに書き込まれたサイズも設定します
\return 0 Base64エンコード入力の復号化に成功したときに返されます
\return BAD_FUNC_ARG
\return ASN_INPUT_E BASE64範囲[A-ZA-Z0-9 + / =]BASE64エンコード入力に無効な行が終了した場合
\param in
\param inLen
\param out
_Example_
\code
byte encoded[] = { // initialize text to decode };
byte decoded[sizeof(encoded)];
// requires at least (sizeof(encoded) * 3 + 3) / 4 room
int outLen = sizeof(decoded);
if( Base64_Decode(encoded,sizeof(encoded), decoded, &outLen) != 0 ) {
// error decoding input buffer
}
\endcode
\sa Base64_Encode
\sa Base16_Decode
*/
int Base64_Decode(const byte* in, word32 inLen, byte* out,
word32* outLen);
/*!
\ingroup Base_Encoding
\brief OUTに格納します0A行末の代わりに '\ N'
\return 0 Base64エンコード入力の復号化に成功したときに返されます
\return BAD_FUNC_ARG
\return BUFFER_E
\param in
\param inLen
\param out
_Example_
\code
byte plain[] = { // initialize text to encode };
byte encoded[MAX_BUFFER_SIZE];
int outLen = sizeof(encoded);
if( Base64_Encode(plain, sizeof(plain), encoded, &outLen) != 0 ) {
// error encoding input buffer
}
\endcode
\sa Base64_EncodeEsc
\sa Base64_Decode
*/
int Base64_Encode(const byte* in, word32 inLen, byte* out,
word32* outLen);
/*!
\ingroup Base_Encoding
\brief OUTに格納します '\ n "行の終わりではなく、0aエスケープ行の終わりを持つデータを書き込みます。正常に完了すると、この機能はまた、出力バッファに書き込まれたバイト数に統一されます。
\return 0 Base64エンコード入力の復号化に成功したときに返されます
\return BAD_FUNC_ARG
\return BUFFER_E
\return ASN_INPUT_E
\param in
\param inLen
\param out
_Example_
\code
byte plain[] = { // initialize text to encode };
byte encoded[MAX_BUFFER_SIZE];
int outLen = sizeof(encoded);
if( Base64_EncodeEsc(plain, sizeof(plain), encoded, &outLen) != 0 ) {
// error encoding input buffer
}
\endcode
\sa Base64_Encode
\sa Base64_Decode
*/
int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out,
word32* outLen);
/*!
\ingroup Base_Encoding
\brief OUTに格納します
\return 0 Base64エンコード入力の復号化に成功したときに返されます
\return BAD_FUNC_ARG
\return BUFFER_E
\return ASN_INPUT_E
\param in
\param inLen
\param out
_Example_
\code
byte plain[] = { // initialize text to encode };
byte encoded[MAX_BUFFER_SIZE];
int outLen = sizeof(encoded);
if( Base64_Encode_NoNl(plain, sizeof(plain), encoded, &outLen) != 0 ) {
// error encoding input buffer
}
\endcode
\sa Base64_Encode
\sa Base64_Decode
*/
int Base64_Encode_NoNl(const byte* in, word32 inLen, byte* out,
word32* outLen);
/*!
\ingroup Base_Encoding
\brief BASE16符号化入力INoutlen内の出力バッファに書き込まれたサイズも設定します
\return 0 Base16エンコード入力の復号にうまく復号化したときに返されます
\return BAD_FUNC_ARG 2
\return ASN_INPUT_E BASE16の範囲外にある場合は返されます[0-9a-f]
\param in
\param inLen
\param out
_Example_
\code
byte encoded[] = { // initialize text to decode };
byte decoded[sizeof(encoded)];
int outLen = sizeof(decoded);
if( Base16_Decode(encoded,sizeof(encoded), decoded, &outLen) != 0 ) {
// error decoding input buffer
}
\endcode
\sa Base64_Encode
\sa Base64_Decode
\sa Base16_Encode
*/
int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen);
/*!
\ingroup Base_Encoding
\brief BASE16出力へのエンコード入力
\return 0
\return BAD_FUNC_ARG INOUToutlenがNULLの場合outlenがInlen Plus 1
\param in
\param inLen
\param out
_Example_
\code
byte in[] = { // Contents of something to be encoded };
byte out[NECESSARY_OUTPUT_SIZE];
word32 outSz = sizeof(out);
if(Base16_Encode(in, sizeof(in), out, &outSz) != 0)
{
// Handle encode error
}
\endcode
\sa Base64_Encode
\sa Base64_Decode
\sa Base16_Decode
*/
int Base16_Encode(const byte* in, word32 inLen, byte* out, word32* outLen);