CTR Pia  4.11.3
Game Communication Engine
common_CryptoSetting.h
1 /*---------------------------------------------------------------------------*
2  Project: Pia
3  File: common_CryptoSetting.h
4 
5  Copyright Nintendo. 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 
14 
15 #pragma once
16 
17 #include <pia/common/common_definitions.h>
18 #include <pia/common/common_Crypto.h>
19 
20 namespace nn
21 {
22 namespace pia
23 {
24 namespace common
25 {
26 
27 
28 /*!
29 @brief A structure for encryption settings.
30 
31 @date 2013-12-04 Initial version.
32 */
34 {
35 public:
36 /*!
37 @brief Instantiates the object with default parameters (default constructor).
38 @details The encryption algorithm is initialized to no encryption, and the encryption key is initialized to zero.
39 */
40  CryptoSetting();
41 
42 
43 public:
44 /*!
45 @brief Indicates the type of encryption algorithm.
46 */
47  enum Mode
48  {
49  MODE_NOTHING = Crypto::MODE_NOTHING, //!< None
50  MODE_AES_128 = Crypto::MODE_AES_128 //!< AES-128
51  };
52 
53 /*!
54 @brief Specifies the key size.
55 */
56  static const size_t KEY_SIZE = 16;
57 
58 /*!
59 @brief The type of encryption algorithm.
60 */
62 
63 /*!
64 @brief The encryption key.
65 @details It does not need to be set if there is no encryption (<tt>MODE_NOTHING</tt>).
66 */
68 };
69 }
70 }
71 } // end of namespace nn::pia::common
u8 m_Key[KEY_SIZE]
The encryption key.
Definition: common_CryptoSetting.h:67
Definition: assert.h:115
Mode m_Mode
The type of encryption algorithm.
Definition: common_CryptoSetting.h:61
AES-128.
Definition: common_CryptoSetting.h:50
None.
Definition: common_CryptoSetting.h:49
Mode
Indicates the type of encryption algorithm.
Definition: common_CryptoSetting.h:47
static const size_t KEY_SIZE
Specifies the key size.
Definition: common_CryptoSetting.h:56
CryptoSetting()
Instantiates the object with default parameters (default constructor).
A structure for encryption settings.
Definition: common_CryptoSetting.h:33