1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: ssl_Common.h 4 Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 $Rev: 31762 $ 11 *--------------------------------------------------------------------------- 12 13 14 */ 15 16 #ifndef NN_SSL_SSL_COMMON_H_ 17 #define NN_SSL_SSL_COMMON_H_ 18 19 #include <nn/Result.h> 20 #include <nn/Handle.h> 21 22 #ifdef __cplusplus 23 24 namespace nn { 25 namespace ssl { 26 //---------------------------------------- 27 // 28 //@{ 29 30 31 /* Please see man pages for details 32 33 34 35 36 37 38 39 */ 40 Result Initialize(void); 41 42 /* Please see man pages for details 43 44 45 46 47 48 */ 49 Result Finalize(void); 50 51 //@} 52 53 //---------------------------------------- 54 // 55 //@{ 56 57 /* Please see man pages for details 58 59 60 61 62 63 64 */ 65 Result GatherRandomEntropy( void ); 66 67 /* Please see man pages for details 68 69 70 71 72 73 74 75 76 77 */ 78 Result GenerateRandomBytes( u8 pOutData[], size_t outDataSize ); 79 80 //@} 81 82 namespace { 83 /* Please see man pages for details 84 85 */ 86 const char PORT_NAME_CONNECTION[] = "ssl:C"; 87 88 /* Please see man pages for details 89 90 */ 91 enum IpcPortType 92 { 93 PORT_CONNECTION, 94 NUM_OF_PORTS 95 }; 96 97 } 98 } // end of namespace ssl 99 } // end of namespace nn 100 101 #endif /*__cplusplus*/ 102 103 104 extern "C" { 105 106 /* Please see man pages for details 107 108 */ 109 nnResult nnsslInitialize(void); 110 111 /* Please see man pages for details 112 113 */ 114 nnResult nnsslFinalize(void); 115 116 /* Please see man pages for details 117 118 */ 119 nnResult nnsslGatherRandomEntropy( void ); 120 121 /* Please see man pages for details 122 123 */ 124 nnResult nnsslGenerateRandomBytes(u8 pOutData[], size_t outDataSize); 125 126 } /*extern "C"*/ 127 128 #endif /* NN_SSL_SSL_COMMON_H_ */ 129 130