#ifndef HAMC_APP_TEST_VECTORS_H
#define HAMC_APP_TEST_VECTORS_H
/** @file 
                    HmacApp_test_vectors.h
   
  HmacApp is responsible for testing MacDxe.

  Copyright (c) 2019 Qualcomm Technologies, Inc.  All Rights Reserved.
  Qualcomm Technologies Proprietary and Confidential.

**/

/*=============================================================================
                              EDIT HISTORY
  This section contains comments describing changes made to the module.
  Notice that changes are listed in reverse chronological order.



 when       who      what, where, why
 --------   ---     ---------------------------------------------------------
 02/22/19   jp      Initial version

=============================================================================*/
#include <stdint.h>
#include <Uefi.h>

/* SHA1/256 HMAC test vectors */
UINT8 sha_hmac_msg_1[2] = { 0x5f, 0xd4 };

UINT8 sha_hmac_key_1[4] = {
  0x4a, 0x65, 0x66, 0x65
};

UINT8 sha_hmac_msg_1_hmac1[20] = {
  0xc4, 0x8b, 0xbf, 0xb4, 0x82, 0x37, 0xe0, 0x8c,
  0xeb, 0x54, 0x7e, 0x6a, 0x91, 0x0d, 0x62, 0x54,
  0xd2, 0x5b, 0x23, 0x9d
};

UINT8 sha_hmac_msg_1_hmac224[28] = {
  0x1a, 0xcf, 0xff, 0x85, 0x8e, 0x42, 0xb8, 0xfc,
  0xad, 0x3e, 0x44, 0xe4, 0xaf, 0x96, 0xea, 0x0e,
  0xc6, 0xf5, 0xb1, 0x59, 0xdd, 0x94, 0x9c, 0xba,
  0x60, 0x68, 0xcb, 0xea
};

UINT8 sha_hmac_msg_1_hmac256[32] = {
  0xA0, 0xCC, 0x63, 0x97, 0x95, 0x25, 0x59, 0xB6,
  0x0E, 0x31, 0x83, 0x00, 0xD3, 0x94, 0x69, 0x85,
  0xCD, 0xD4, 0x5A, 0xA9, 0xCF, 0xF8, 0xAB, 0x0D,
  0xA2, 0xA5, 0x05, 0x71, 0x07, 0xC8, 0x08, 0x9C
};

UINT8 sha_hmac_msg_1_hmac384[48] = {
  0x8c, 0x4d, 0x94, 0x85, 0x6c, 0x2e, 0x44, 0x4d,
  0xb4, 0xc8, 0x7c, 0xa4, 0x97, 0x72, 0x40, 0x9c,
  0x1c, 0x87, 0x3b, 0xd3, 0xf5, 0x1c, 0x4b, 0xa2,
  0xd2, 0x95, 0x6a, 0xe8, 0x5b, 0xa1, 0x6c, 0xd9,
  0xa3, 0xa0, 0xf9, 0x2f, 0x1d, 0xe0, 0x21, 0x40,
  0x17, 0xe0, 0x31, 0x67, 0xb5, 0x83, 0x85, 0x31
};

UINT8 sha_hmac_msg_1_hmac512[64] = {
  0x6b, 0xef, 0xc4, 0x8b, 0xe1, 0x5e, 0x4c, 0x65,
  0xd7, 0x72, 0x5f, 0x1f, 0x1b, 0x51, 0xaa, 0xe7,
  0xa2, 0x8a, 0x9c, 0x74, 0x66, 0x23, 0x4b, 0x23,
  0xec, 0x20, 0x33, 0xe3, 0x50, 0x1f, 0x44, 0x63,
  0xb2, 0x48, 0xcd, 0xe1, 0xf0, 0x61, 0xbe, 0xe8,
  0x06, 0xab, 0x15, 0x00, 0x22, 0xf8, 0x93, 0xf7,
  0x1e, 0xce, 0x97, 0x11, 0x3f, 0x87, 0x81, 0x05,
  0x7f, 0xbb, 0x2e, 0x43, 0x27, 0x8d, 0xcf, 0xb6
};

UINT8 sha_hmac_msg_2[8] = {
  0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65
};

UINT8 sha_hmac_key_2[20] = {
  0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
  0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
  0x0B, 0x0B, 0x0B, 0x0B
};

UINT8 sha_hmac_msg_2_hmac1[20] = {
  0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64,
  0xe2, 0x8b, 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e,
  0xf1, 0x46, 0xbe, 0x00
};

UINT8 sha_hmac_msg_2_hmac224[28] = {
  0x89, 0x6f, 0xb1, 0x12, 0x8a, 0xbb, 0xdf, 0x19,
  0x68, 0x32, 0x10, 0x7c, 0xd4, 0x9d, 0xf3, 0x3f,
  0x47, 0xb4, 0xb1, 0x16, 0x99, 0x12, 0xba, 0x4f,
  0x53, 0x68, 0x4b, 0x22
};

UINT8 sha_hmac_msg_2_hmac256[32] = {
  0xB0, 0x34, 0x4C, 0x61, 0xD8, 0xDB, 0x38, 0x53,
  0x5C, 0xA8, 0xAF, 0xCE, 0xAF, 0x0B, 0xF1, 0x2B,
  0x88, 0x1D, 0xC2, 0x00, 0xC9, 0x83, 0x3D, 0xA7,
  0x26, 0xE9, 0x37, 0x6C, 0x2E, 0x32, 0xCF, 0xF7
};

UINT8 sha_hmac_msg_2_hmac384[48] = {
  0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62,
  0x6b, 0x08, 0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f,
  0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6,
  0x82, 0xaa, 0x03, 0x4c, 0x7c, 0xeb, 0xc5, 0x9c,
  0xfa, 0xea, 0x9e, 0xa9, 0x07, 0x6e, 0xde, 0x7f,
  0x4a, 0xf1, 0x52, 0xe8, 0xb2, 0xfa, 0x9c, 0xb6
};

UINT8 sha_hmac_msg_2_hmac512[64] = {
  0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d,
  0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0,
  0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78,
  0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde,
  0xda, 0xa8, 0x33, 0xb7, 0xd6, 0xb8, 0xa7, 0x02,
  0x03, 0x8b, 0x27, 0x4e, 0xae, 0xa3, 0xf4, 0xe4, 
  0xbe, 0x9d, 0x91, 0x4e, 0xeb, 0x61, 0xf1, 0x70,
  0x2e, 0x69, 0x6c, 0x20, 0x3a, 0x12, 0x68, 0x54
};

UINT8 sha_hmac_msg_3[28] = {
  0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6F, 0x20,
  0x79, 0x61, 0x20, 0x77, 0x61, 0x6E, 0x74, 0x20,
  0x66, 0x6F, 0x72, 0x20, 0x6E, 0x6F, 0x74, 0x68,
  0x69, 0x6E, 0x67, 0x3F
};

UINT8 sha_hmac_key_3[4] = {
  0x4A, 0x65, 0x66, 0x65
};
UINT8 sha_hmac_msg_3_hmac1[20] = {
  0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2,
  0xd2, 0x74, 0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c,
  0x25, 0x9a, 0x7c, 0x79
};

UINT8 sha_hmac_msg_3_hmac224[28] = {
  0xa3, 0x0e, 0x01, 0x09, 0x8b, 0xc6, 0xdb, 0xbf,
  0x45, 0x69, 0x0f, 0x3a, 0x7e, 0x9e, 0x6d, 0x0f,
  0x8b, 0xbe, 0xa2, 0xa3, 0x9e, 0x61, 0x48, 0x00,
  0x8f, 0xd0, 0x5e, 0x44
};

UINT8 sha_hmac_msg_3_hmac256[32] = {
  0x5B, 0xDC, 0xC1, 0x46, 0xBF, 0x60, 0x75, 0x4E,
  0x6A, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xC7,
  0x5A, 0x00, 0x3F, 0x08, 0x9D, 0x27, 0x39, 0x83,
  0x9D, 0xEC, 0x58, 0xB9, 0x64, 0xEC, 0x38, 0x43
};

UINT8 sha_hmac_msg_3_hmac384[48] = {
  0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31,
  0x61, 0x7f, 0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b,
  0x9c, 0x7e, 0xf4, 0x64, 0xf5, 0xa0, 0x1b, 0x47, 
  0xe4, 0x2e, 0xc3, 0x73, 0x63, 0x22, 0x44, 0x5e,
  0x8e, 0x22, 0x40, 0xca, 0x5e, 0x69, 0xe2, 0xc7,
  0x8b, 0x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
  0x63, 0xf1, 0x75, 0xd3
};

UINT8 sha_hmac_msg_4_hmac224[28] = {
  0x7f, 0xb3, 0xcb, 0x35, 0x88, 0xc6, 0xc1, 0xf6,
  0xff, 0xa9, 0x69, 0x4d, 0x7d, 0x6a, 0xd2, 0x64,
  0x93, 0x65, 0xb0, 0xc1, 0xf6, 0x5d, 0x69, 0xd1,
  0xec, 0x83, 0x33, 0xea
};

UINT8 sha_hmac_msg_4_hmac256[32] = {
  0x77, 0x3E, 0xA9, 0x1E, 0x36, 0x80, 0x0E, 0x46,
  0x85, 0x4D, 0xB8, 0xEB, 0xD0, 0x91, 0x81, 0xA7,
  0x29, 0x59, 0x09, 0x8B, 0x3E, 0xF8, 0xC1, 0x22,
  0xD9, 0x63, 0x55, 0x14, 0xCE, 0xD5, 0x65, 0xFE
};


UINT8 sha_hmac_msg_4_hmac384[48] = {
  0x88, 0x06, 0x26, 0x08, 0xd3, 0xe6, 0xad, 0x8a,
  0x0a, 0xa2, 0xac, 0xe0, 0x14, 0xc8, 0xa8, 0x6f,
  0x0a, 0xa6, 0x35, 0xd9, 0x47, 0xac, 0x9f, 0xeb,
  0xe8, 0x3e, 0xf4, 0xe5, 0x59, 0x66, 0x14, 0x4b,
  0x2a, 0x5a, 0xb3, 0x9d, 0xc1, 0x38, 0x14, 0xb9,
  0x4e, 0x3a, 0xb6, 0xe1, 0x01, 0xa3, 0x4f, 0x27
};

UINT8 sha_hmac_msg_4_hmac512[64] = {
  0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84,
  0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9,
  0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36,
  0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39,
  0xbf, 0x3e, 0x84, 0x82, 0x79, 0xa7, 0x22, 0xc8,
  0x06, 0xb4, 0x85, 0xa4, 0x7e, 0x67, 0xc8, 0x07,
  0xb9, 0x46, 0xa3, 0x37, 0xbe, 0xe8, 0x94, 0x26,
  0x74, 0x27, 0x88, 0x59, 0xe1, 0x32, 0x92, 0xfb
};

UINT8 sha_hmac_msg_5[50] = {
  0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD,
  0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD,
  0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD,
  0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD,
  0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD,
  0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD,
  0xCD, 0xCD
};

UINT8 sha_hmac_key_5[25] = {
  0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
  0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
  0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
  0x19
};

UINT8 sha_hmac_msg_5_hmac1[20] = {
  0x4c, 0x90, 0x07, 0xf4, 0x02, 0x62, 0x50, 0xc6,
  0xbc, 0x84, 0x14, 0xf9, 0xbf, 0x50, 0xc8, 0x6c,
  0x2d, 0x72, 0x35, 0xda
};

UINT8 sha_hmac_msg_5_hmac224[28] = {
  0x6c, 0x11, 0x50, 0x68, 0x74, 0x01, 0x3c, 0xac,
  0x6a, 0x2a, 0xbc, 0x1b, 0xb3, 0x82, 0x62, 0x7c,
  0xec, 0x6a, 0x90, 0xd8, 0x6e, 0xfc, 0x01, 0x2d,
  0xe7, 0xaf, 0xec, 0x5a
};

UINT8 sha_hmac_msg_5_hmac256[32] = {
  0x82, 0x55, 0x8A, 0x38, 0x9A, 0x44, 0x3C, 0x0E,
  0xA4, 0xCC, 0x81, 0x98, 0x99, 0xF2, 0x08, 0x3A,
  0x85, 0xF0, 0xFA, 0xA3, 0xE5, 0x78, 0xF8, 0x07,
  0x7A, 0x2E, 0x3F, 0xF4, 0x67, 0x29, 0x66, 0x5B
};

UINT8 sha_hmac_msg_5_hmac384[48] = {
  0x3e, 0x8a, 0x69, 0xb7, 0x78, 0x3c, 0x25, 0x85,
  0x19, 0x33, 0xab, 0x62, 0x90, 0xaf, 0x6c, 0xa7,
  0x7a, 0x99, 0x81, 0x48, 0x08, 0x50, 0x00, 0x9c,
  0xc5, 0x57, 0x7c, 0x6e, 0x1f, 0x57, 0x3b, 0x4e,
  0x68, 0x01, 0xdd, 0x23, 0xc4, 0xa7, 0xd6, 0x79,
  0xcc, 0xf8, 0xa3, 0x86, 0xc6, 0x74, 0xcf, 0xfb
};

UINT8 sha_hmac_msg_5_hmac512[64] = {
  0xb0, 0xba, 0x46, 0x56, 0x37, 0x45, 0x8c, 0x69,
  0x90, 0xe5, 0xa8, 0xc5, 0xf6, 0x1d, 0x4a, 0xf7,
  0xe5, 0x76, 0xd9, 0x7f, 0xf9, 0x4b, 0x87, 0x2d,
  0xe7, 0x6f, 0x80, 0x50, 0x36, 0x1e, 0xe3, 0xdb,
  0xa9, 0x1c, 0xa5, 0xc1, 0x1a, 0xa2, 0x5e, 0xb4,
  0xd6, 0x79, 0x27, 0x5c, 0xc5, 0x78, 0x80, 0x63,
  0xa5, 0xf1, 0x97, 0x41, 0x12, 0x0c, 0x4f, 0x2d,
  0xe2, 0xad, 0xeb, 0xeb, 0x10, 0xa2, 0x98, 0xdd
};

UINT8 sha_hmac_msg_6[54] = {
  0x54, 0x65, 0x73, 0x74, 0x20, 0x55, 0x73, 0x69,
  0x6E, 0x67, 0x20, 0x4C, 0x61, 0x72, 0x67, 0x65,
  0x72, 0x20, 0x54, 0x68, 0x61, 0x6E, 0x20, 0x42,
  0x6C, 0x6F, 0x63, 0x6B, 0x2D, 0x53, 0x69, 0x7A,
  0x65, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x2D, 0x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e6, 0xdf, 0x2b
};

UINT8 sha_hmac_msg_6_hmac224[28] = {
  0x95, 0xe9, 0xa0, 0xdb, 0x96, 0x20, 0x95, 0xad,
  0xae, 0xbe, 0x9b, 0x2d, 0x6f, 0x0d, 0xbc, 0xe2,
  0xd4, 0x99, 0xf1, 0x12, 0xf2, 0xd2, 0xb7, 0x27,
  0x3f, 0xa6, 0x87, 0x0e
};

UINT8 sha_hmac_msg_6_hmac256[32] = {
  0x60, 0xE4, 0x31, 0x59, 0x1E, 0xE0, 0xB6, 0x7F,
  0x0D, 0x8A, 0x26, 0xAA, 0xCB, 0xF5, 0xB7, 0x7F,
  0x8E, 0x0B, 0xC6, 0x21, 0x37, 0x28, 0xC5, 0x14,
  0x05, 0x46, 0x04, 0x0F, 0x0E, 0xE3, 0x7F, 0x54
};

UINT8 sha_hmac_msg_6_hmac384[48] = {
  0x4e, 0xce, 0x08, 0x44, 0x85, 0x81, 0x3e, 0x90,
  0x88, 0xd2, 0xc6, 0x3a, 0x04, 0x1b, 0xc5, 0xb4,
  0x4f, 0x9e, 0xf1, 0x01, 0x2a, 0x2b, 0x58, 0x8f,
  0x3c, 0xd1, 0x1f, 0x05, 0x03, 0x3a, 0xc4, 0xc6,
  0x0c, 0x2e, 0xf6, 0xab, 0x40, 0x30, 0xfe, 0x82,
  0x96, 0x24, 0x8d, 0xf1, 0x63, 0xf4, 0x49, 0x52
};

UINT8 sha_hmac_msg_6_hmac512[64] = {
  0x80, 0xb2, 0x42, 0x63, 0xc7, 0xc1, 0xa3, 0xeb,
  0xb7, 0x14, 0x93, 0xc1, 0xdd, 0x7b, 0xe8, 0xb4,
  0x9b, 0x46, 0xd1, 0xf4, 0x1b, 0x4a, 0xee, 0xc1,
  0x12, 0x1b, 0x01, 0x37, 0x83, 0xf8, 0xf3, 0x52,
  0x6b, 0x56, 0xd0, 0x37, 0xe0, 0x5f, 0x25, 0x98,
  0xbd, 0x0f, 0xd2, 0x21, 0x5d, 0x6a, 0x1e, 0x52,
  0x95, 0xe6, 0x4f, 0x73, 0xf6, 0x3f, 0x0a, 0xec,
  0x8b, 0x91, 0x5a, 0x98, 0x5d, 0x78, 0x65, 0x98
};

UINT8 sha_hmac_msg_7[147] = {
  0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20,
  0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x75,
  0x73, 0x69, 0x6E, 0x67, 0x20, 0x61, 0x20, 0x6C,
  0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68,
  0x61, 0x6E, 0x20, 0x62, 0x6C, 0x6F, 0x63, 0x6B,
  0x2D, 0x73, 0x69, 0x7A, 0x65, 0x20, 0x6B, 0x65,
  0x79, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x61, 0x20,
  0x6C, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74,
  0x68, 0x61, 0x6E, 0x20, 0x62, 0x6C, 0x6F, 0x63,
  0x6B, 0x2D, 0x73, 0x69, 0x7A, 0x65, 0x20, 0x64,
  0x61, 0x74, 0x61, 0x2E, 0x20, 0x54, 0x68, 0x65,
  0x20, 0x6B, 0x65, 0x79, 0x20, 0x6E, 0x65, 0x65,
  0x64, 0x73, 0x20, 0x74, 0x6F, 0x20, 0x62, 0x65,
  0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x20,
  0x62, 0x65, 0x66, 0x6F, 0x72, 0x65, 0x20, 0x62,
  0x65, 0x69, 0x6E, 0x67, 0x20, 0x75, 0x73, 0x65,
  0x64, 0x20, 0x62, 0x79, 0x20, 0x48, 0x4D, 0x41,
  0x43, 0x20, 0x61, 0x6C, 0x67, 0x6F, 0x72, 0x69,
  0x74, 0x68, 0x6D
};

UINT8 sha_hmac_key_7[131] = {
  0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
  0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
  0xAA, 0xAA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 sha_hmac_msg_7_hmac256[32] = {
  0x3C, 0xB1, 0x7A, 0xDD, 0x8A, 0x41, 0x81, 0x60,
  0xE5, 0x1C, 0x0D, 0x43, 0x9F, 0xE9, 0x8B, 0x2C,
  0xE5, 0x46, 0x4D, 0xEF, 0xB6, 0x80, 0x89, 0x71,
  0x09, 0xED, 0x70, 0x0B, 0x8D, 0xB6, 0x2C, 0xF9
};

UINT8 sha_hmac_msg_7_hmac384[48] = {
  0x86, 0xed, 0x3f, 0xb8, 0x0e, 0x9c, 0xbd, 0xd0,
  0xdd, 0x1a, 0xb8, 0xc3, 0xaf, 0xa4, 0x08, 0x27,
  0xfe, 0x26, 0xe9, 0xc8, 0xc9, 0x65, 0xdc, 0x64,
  0xe1, 0x8c, 0x26, 0x73, 0xa6, 0x5b, 0xac, 0x95,
  0x1d, 0xe6, 0xa0, 0x2c, 0xd7, 0xbc, 0xd4, 0xc9,
  0x8e, 0xb6, 0x9a, 0xa7, 0xf5, 0x18, 0x77, 0xaf
};

UINT8 sha_hmac_msg_7_hmac512[64] = {
  0x7f, 0x14, 0xba, 0xea, 0xa8, 0xb3, 0xd8, 0xf1,
  0x7f, 0x8b, 0xe3, 0xd2, 0xba, 0xe1, 0x77, 0x90,
  0x6d, 0xff, 0xbd, 0xd3, 0x6f, 0x0d, 0x9e, 0x79,
  0xbf, 0x4c, 0x5b, 0xd2, 0x6b, 0xfe, 0xfc, 0xdc,
  0x7f, 0x53, 0x21, 0x73, 0x2d, 0x99, 0x20, 0x5e,
  0x98, 0x09, 0x5b, 0x5e, 0xfc, 0xb0, 0xb3, 0xad,
  0x7b, 0x75, 0x97, 0xf1, 0x47, 0x05, 0x58, 0x9e,
  0xdb, 0x7d, 0xff, 0x15, 0x2e, 0xdb, 0xc7, 0x3a
};

typedef struct {
  EFI_GUID *HashAlgoGuid;
  UINT8 *msg;
  UINTN msg_len;
  UINT8 *hmac_key;
  UINTN hmac_key_len;
  UINT8 *msg_hmac_result;
} uefi_hmac_test_vector_type;

uefi_hmac_test_vector_type uefi_hmac_test_vectors[] = {
  {&gEfiHashAlgorithmSha1Guid,
   sha_hmac_msg_1, sizeof(sha_hmac_msg_1), sha_hmac_key_1,
   sizeof(sha_hmac_key_1), sha_hmac_msg_1_hmac1}
  ,
  {&gEfiHashAlgorithmSha224Guid,
   sha_hmac_msg_1, sizeof(sha_hmac_msg_1), sha_hmac_key_1,
   sizeof(sha_hmac_key_1), sha_hmac_msg_1_hmac224}
  ,
  {&gEfiHashAlgorithmSha256Guid,
   sha_hmac_msg_1, sizeof(sha_hmac_msg_1), sha_hmac_key_1,
   sizeof(sha_hmac_key_1), sha_hmac_msg_1_hmac256}
  ,
  {&gEfiHashAlgorithmSha384Guid,
   sha_hmac_msg_1, sizeof(sha_hmac_msg_1), sha_hmac_key_1,
   sizeof(sha_hmac_key_1), sha_hmac_msg_1_hmac384}
  ,
  {&gEfiHashAlgorithmSha512Guid,
   sha_hmac_msg_1, sizeof(sha_hmac_msg_1), sha_hmac_key_1,
   sizeof(sha_hmac_key_1), sha_hmac_msg_1_hmac512}
  ,
  {&gEfiHashAlgorithmSha1Guid,
   sha_hmac_msg_2, sizeof(sha_hmac_msg_2), sha_hmac_key_2,
   sizeof(sha_hmac_key_2), sha_hmac_msg_2_hmac1}
  ,
  {&gEfiHashAlgorithmSha224Guid,
   sha_hmac_msg_2, sizeof(sha_hmac_msg_2), sha_hmac_key_2,
   sizeof(sha_hmac_key_2), sha_hmac_msg_2_hmac224}
  ,
  {&gEfiHashAlgorithmSha256Guid,
   sha_hmac_msg_2, sizeof(sha_hmac_msg_2), sha_hmac_key_2,
   sizeof(sha_hmac_key_2), sha_hmac_msg_2_hmac256}
  ,
  {&gEfiHashAlgorithmSha384Guid,
   sha_hmac_msg_2, sizeof(sha_hmac_msg_2), sha_hmac_key_2,
   sizeof(sha_hmac_key_2), sha_hmac_msg_2_hmac384}
  ,
  {&gEfiHashAlgorithmSha512Guid,
   sha_hmac_msg_2, sizeof(sha_hmac_msg_2), sha_hmac_key_2,
   sizeof(sha_hmac_key_2), sha_hmac_msg_2_hmac512}
  ,
  {&gEfiHashAlgorithmSha1Guid,
   sha_hmac_msg_3, sizeof(sha_hmac_msg_3), sha_hmac_key_3,
   sizeof(sha_hmac_key_3), sha_hmac_msg_3_hmac1}
  ,
  {&gEfiHashAlgorithmSha224Guid,
   sha_hmac_msg_3, sizeof(sha_hmac_msg_3), sha_hmac_key_3,
   sizeof(sha_hmac_key_3), sha_hmac_msg_3_hmac224}
  ,
  {&gEfiHashAlgorithmSha256Guid,
   sha_hmac_msg_3, sizeof(sha_hmac_msg_3), sha_hmac_key_3,
   sizeof(sha_hmac_key_3), sha_hmac_msg_3_hmac256}
  ,
  {&gEfiHashAlgorithmSha384Guid,
   sha_hmac_msg_3, sizeof(sha_hmac_msg_3), sha_hmac_key_3,
   sizeof(sha_hmac_key_3), sha_hmac_msg_3_hmac384}
  ,
  {&gEfiHashAlgorithmSha512Guid,
   sha_hmac_msg_3, sizeof(sha_hmac_msg_3), sha_hmac_key_3,
   sizeof(sha_hmac_key_3), sha_hmac_msg_3_hmac512}
  ,
  {&gEfiHashAlgorithmSha1Guid,
   sha_hmac_msg_4, sizeof(sha_hmac_msg_4), sha_hmac_key_4,
   sizeof(sha_hmac_key_4), sha_hmac_msg_4_hmac1}
  ,
  {&gEfiHashAlgorithmSha224Guid,
   sha_hmac_msg_4, sizeof(sha_hmac_msg_4), sha_hmac_key_4,
   sizeof(sha_hmac_key_4), sha_hmac_msg_4_hmac224}
  ,
  {&gEfiHashAlgorithmSha256Guid,
   sha_hmac_msg_4, sizeof(sha_hmac_msg_4), sha_hmac_key_4,
   sizeof(sha_hmac_key_4), sha_hmac_msg_4_hmac256}
  ,
  {&gEfiHashAlgorithmSha384Guid,
   sha_hmac_msg_4, sizeof(sha_hmac_msg_4), sha_hmac_key_4,
   sizeof(sha_hmac_key_4), sha_hmac_msg_4_hmac384}
  ,
  {&gEfiHashAlgorithmSha512Guid,
   sha_hmac_msg_4, sizeof(sha_hmac_msg_4), sha_hmac_key_4,
   sizeof(sha_hmac_key_4), sha_hmac_msg_4_hmac512}
  ,
  {&gEfiHashAlgorithmSha1Guid,
   sha_hmac_msg_5, sizeof(sha_hmac_msg_5), sha_hmac_key_5,
   sizeof(sha_hmac_key_5), sha_hmac_msg_5_hmac1}
  ,
  {&gEfiHashAlgorithmSha224Guid,
   sha_hmac_msg_5, sizeof(sha_hmac_msg_5), sha_hmac_key_5,
   sizeof(sha_hmac_key_5), sha_hmac_msg_5_hmac224}
  ,
  {&gEfiHashAlgorithmSha256Guid,
   sha_hmac_msg_5, sizeof(sha_hmac_msg_5), sha_hmac_key_5,
   sizeof(sha_hmac_key_5), sha_hmac_msg_5_hmac256}
  ,
  {&gEfiHashAlgorithmSha384Guid,
   sha_hmac_msg_5, sizeof(sha_hmac_msg_5), sha_hmac_key_5,
   sizeof(sha_hmac_key_5), sha_hmac_msg_5_hmac384}
  ,
  {&gEfiHashAlgorithmSha512Guid,
   sha_hmac_msg_5, sizeof(sha_hmac_msg_5), sha_hmac_key_5,
   sizeof(sha_hmac_key_5), sha_hmac_msg_5_hmac512}
  ,
  {&gEfiHashAlgorithmSha1Guid,
   sha_hmac_msg_6, sizeof(sha_hmac_msg_6), sha_hmac_key_6,
   sizeof(sha_hmac_key_6), sha_hmac_msg_6_hmac1}
  ,
  {&gEfiHashAlgorithmSha224Guid,
   sha_hmac_msg_6, sizeof(sha_hmac_msg_6), sha_hmac_key_6,
   sizeof(sha_hmac_key_6), sha_hmac_msg_6_hmac224}
  ,
  {&gEfiHashAlgorithmSha256Guid,
   sha_hmac_msg_6, sizeof(sha_hmac_msg_6), sha_hmac_key_6,
   sizeof(sha_hmac_key_6), sha_hmac_msg_6_hmac256}
  ,
  {&gEfiHashAlgorithmSha384Guid,
   sha_hmac_msg_6, sizeof(sha_hmac_msg_6), sha_hmac_key_6,
   sizeof(sha_hmac_key_6), sha_hmac_msg_6_hmac384}
  ,
  {&gEfiHashAlgorithmSha512Guid,
   sha_hmac_msg_6, sizeof(sha_hmac_msg_6), sha_hmac_key_6,
   sizeof(sha_hmac_key_6), sha_hmac_msg_6_hmac512}
  ,
  {&gEfiHashAlgorithmSha1Guid,
   sha_hmac_msg_7, sizeof(sha_hmac_msg_7), sha_hmac_key_7,
   sizeof(sha_hmac_key_7), sha_hmac_msg_7_hmac1}
  ,
  {&gEfiHashAlgorithmSha224Guid,
   sha_hmac_msg_7, sizeof(sha_hmac_msg_7), sha_hmac_key_7,
   sizeof(sha_hmac_key_7), sha_hmac_msg_7_hmac224}
  ,
  {&gEfiHashAlgorithmSha256Guid,
   sha_hmac_msg_7, sizeof(sha_hmac_msg_7), sha_hmac_key_7,
   sizeof(sha_hmac_key_7), sha_hmac_msg_7_hmac256}
  ,
  {&gEfiHashAlgorithmSha384Guid,
   sha_hmac_msg_7, sizeof(sha_hmac_msg_7), sha_hmac_key_7,
   sizeof(sha_hmac_key_7), sha_hmac_msg_7_hmac384}
  ,
  {&gEfiHashAlgorithmSha512Guid,
   sha_hmac_msg_7, sizeof(sha_hmac_msg_7), sha_hmac_key_7,
   sizeof(sha_hmac_key_7), sha_hmac_msg_7_hmac512}
};

typedef struct {
  UINT8 *msg;
  UINTN msg_len;
  UINT8 *hmac_key;
  UINTN hmac_key_len;
  UINT8 *msg_hmac_result;
} HmacLibAPI_hmac_test_vector_type;

/* HmacLib only suppurt SHA256 - only need test Hmac SHA256*/
HmacLibAPI_hmac_test_vector_type HmacLibAPI_hmac_test_vectors[] = {
  {
   sha_hmac_msg_1, sizeof(sha_hmac_msg_1), sha_hmac_key_1,
   sizeof(sha_hmac_key_1), sha_hmac_msg_1_hmac256}
  ,
  {
   sha_hmac_msg_2, sizeof(sha_hmac_msg_2), sha_hmac_key_2,
   sizeof(sha_hmac_key_2), sha_hmac_msg_2_hmac256}
  ,
  {
   sha_hmac_msg_3, sizeof(sha_hmac_msg_3), sha_hmac_key_3,
   sizeof(sha_hmac_key_3), sha_hmac_msg_3_hmac256}
  ,
  {
   sha_hmac_msg_4, sizeof(sha_hmac_msg_4), sha_hmac_key_4,
   sizeof(sha_hmac_key_4), sha_hmac_msg_4_hmac256}
  ,
  {
   sha_hmac_msg_5, sizeof(sha_hmac_msg_5), sha_hmac_key_5,
   sizeof(sha_hmac_key_5), sha_hmac_msg_5_hmac256}
  ,
  {
   sha_hmac_msg_6, sizeof(sha_hmac_msg_6), sha_hmac_key_6,
   sizeof(sha_hmac_key_6), sha_hmac_msg_6_hmac256}
  ,
  {
   sha_hmac_msg_7, sizeof(sha_hmac_msg_7), sha_hmac_key_7,
   sizeof(sha_hmac_key_7), sha_hmac_msg_7_hmac256}
};

#endif /* HAMC_APP_TEST_VECTORS_H */
