28 static const int8_t 
C2H[256] = { 
    30   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    31   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    32   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    33    0,  1,  2,  3,  4,  5,  6,  7,  8,  9, -1, -1, -1, -1, -1, -1, 
    34   -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    35   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    36   -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    37   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    38   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    39   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    40   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    41   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    42   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    43   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    44   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    45   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    55 HexDecode::convert(
const uint8_t* hex, 
size_t hexLen)
    62   size_t totalDecodedLen = hexLen + (m_hasOddByte ? 1 : 0);
    63   if (totalDecodedLen % 2 == 1) {
    64     m_oddByte = hex[hexLen - 1];
    80 unique_ptr<Transform::OBuffer>
    81 HexDecode::toBytes(
const uint8_t* hex, 
size_t hexLen)
    83   size_t bufferSize = (hexLen + (m_hasOddByte ? 1 : 0)) >> 1;
    84   auto buffer = make_unique<OBuffer>(bufferSize);
    85   uint8_t* buf = &buffer->front();
    88     if (C2H[hex[0]] < 0 || C2H[m_oddByte] < 0)
    91     buf[0] = (C2H[m_oddByte] << 4) + (C2H[hex[0]]);
    98     if (C2H[hex[0]] < 0 || C2H[hex[1]] < 0)
   101     buf[0] = (C2H[hex[0]] << 4) + (C2H[hex[1]]);
   110 unique_ptr<Transform>
   113   return make_unique<HexDecode>();
 
Copyright (c) 2011-2015 Regents of the University of California. 
 
Catch-all error for security policy errors that don't fit in other categories.