forked from wolfSSL/wolfssl
add lower case support to Base16 decode for better known answer test support, export
This commit is contained in:
@@ -327,7 +327,12 @@ int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen)
|
|||||||
static
|
static
|
||||||
const byte hexDecode[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
const byte hexDecode[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||||
BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||||
10, 11, 12, 13, 14, 15
|
10, 11, 12, 13, 14, 15, /* upper case A-F */
|
||||||
|
BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||||
|
BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||||
|
BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||||
|
BAD, BAD, /* G - ` */
|
||||||
|
10, 11, 12, 13, 14, 15 /* lower case a-f */
|
||||||
}; /* A starts at 0x41 not 0x3A */
|
}; /* A starts at 0x41 not 0x3A */
|
||||||
|
|
||||||
int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)
|
int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)
|
||||||
|
@@ -159,7 +159,7 @@ CYASSL_API int AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
|
|||||||
CYASSL_API int AesCbcDecrypt_fips(Aes* aes, byte* out, const byte* in,
|
CYASSL_API int AesCbcDecrypt_fips(Aes* aes, byte* out, const byte* in,
|
||||||
word32 sz);
|
word32 sz);
|
||||||
#ifndef FIPS_NO_WRAPPERS
|
#ifndef FIPS_NO_WRAPPERS
|
||||||
/* if not internal or fips.c consumer force fips calls if fips build */
|
/* if not impl or fips.c impl wrapper force fips calls if fips build */
|
||||||
#define AesSetKey AesSetKey_fips
|
#define AesSetKey AesSetKey_fips
|
||||||
#define AesCbcEncrypt AesCbcEncrypt_fips
|
#define AesCbcEncrypt AesCbcEncrypt_fips
|
||||||
#define AesCbcDecrypt AesCbcDecrypt_fips
|
#define AesCbcDecrypt AesCbcDecrypt_fips
|
||||||
|
@@ -42,7 +42,7 @@ CYASSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out,
|
|||||||
CYASSL_API
|
CYASSL_API
|
||||||
int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out,
|
int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out,
|
||||||
word32* outLen);
|
word32* outLen);
|
||||||
CYASSL_LOCAL
|
CYASSL_API
|
||||||
int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen);
|
int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user