add lower case support to Base16 decode for better known answer test support, export

This commit is contained in:
toddouska
2014-03-20 10:31:52 -07:00
parent 58885b36eb
commit 8bc6bf9424
3 changed files with 8 additions and 3 deletions

View File

@@ -327,7 +327,12 @@ int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen)
static
const byte hexDecode[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
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 */
int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)