1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     crypto_Hmac.h
4 
5   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 12449 $
14  *---------------------------------------------------------------------------*/
15 
16 /*! @file
17     @brief      HMAC に関する API の宣言
18 
19 */
20 
21 #ifndef NN_CRYPTO_CRYPTO_HMAC_H_
22 #define NN_CRYPTO_CRYPTO_HMAC_H_
23 
24 #ifdef __cplusplus
25 
26 namespace nn{ namespace crypto{
27 
28 /*!
29     @brief    HMAC-SHA1 を計算します。
30 
31     @param[out]    pOut       HMAC 値を格納する場所へのポインタ
32     @param[in]     pData      入力データのポインタ
33     @param[in]     length     入力データ長
34     @param[in]     pKeyData   鍵データへのポインタ
35     @param[in]     keyLength  鍵データ長
36 
37     @return   無し。(pOut に HMAC-SHA1 計算結果が格納されます。)
38 */
39 void CalculateHmacSha1(
40     void*                   pOut,
41     const void*             pData,
42     size_t                  length,
43     const void*             pKeyData,
44     size_t                  keyLength
45 );
46 
47 /*!
48     @brief    HMAC-SHA256 を計算します。
49 
50     @param[out]    pOut       HMAC 値を格納する場所へのポインタ
51     @param[in]     pData      入力データのポインタ
52     @param[in]     length     入力データ長
53     @param[in]     pKeyData   鍵データへのポインタ
54     @param[in]     keyLength  鍵データ長
55 
56     @return   無し。(pOut に HMAC-SHA256 計算結果が格納されます。)
57 */
58 void CalculateHmacSha256(
59     void*                   pOut,
60     const void*             pData,
61     size_t                  length,
62     const void*             pKeyData,
63     size_t                  keyLength
64 );
65 
66 }} // namespace nn::crypto
67 
68 #endif // __cplusplus
69 
70 
71 #endif /* NN_CRYPTO_CRYPTO_HMAC_H_ */
72