CTR Pia  4.11.3
Game Communication Engine
nn::pia::common::SignatureSettingWithKeyBuffer< KeySize > Class Template Reference

This class represents signature setting information and includes an internal signature key buffer. More...

+ Inheritance diagram for nn::pia::common::SignatureSettingWithKeyBuffer< KeySize >:

Public Types

Public Member Functions

 SignatureSettingWithKeyBuffer (Mode mode)
 Instantiates an object. Initializes the object instance using the specified signature algorithm. More...
 
 SignatureSettingWithKeyBuffer ()
 Instantiates an object. The instance is initialized using the predefined signature algorithm (HMAC-MD5). More...
 
u8 * GetKeyBufferPtr ()
 Gets a pointer to the key data buffer. More...
 
const void * GetKeyData () const
 Gets the address of the key data that is currently specified. More...
 
size_t GetKeySize () const
 Gets the size of the key data that is currently specified. More...
 
Mode GetMode () const
 Gets the signature algorithm that is currently specified. More...
 
nn::Result SetMode (Mode mode)
 Sets the signature algorithm. More...
 

Static Public Attributes

static const SignatureSetting NO_SIGNATURE
 Specifies an instance of the signature setting class that has no signature.
 
static const u32 SIGNATURE_KEY_DATA_SIZE_MAX = 32
 Maximum number of bytes for the key data used for the signature.
 

Detailed Description

template<size_t KeySize>
class nn::pia::common::SignatureSettingWithKeyBuffer< KeySize >

This class represents signature setting information and includes an internal signature key buffer.

Parameters
KeySizeSpecifies the key size (in bytes). A buffer of this size is configured.


Revision History:
2012-11-30 Initial version.

Member Enumeration Documentation

Indicates the type of signature algorithm.

Enumerator
MODE_NOTHING 

No signature.

MODE_HMAC_MD5 

HMAC-MD5 signature.

Constructor & Destructor Documentation

template<size_t KeySize>
nn::pia::common::SignatureSettingWithKeyBuffer< KeySize >::SignatureSettingWithKeyBuffer ( Mode  mode)
inlineexplicit

Instantiates an object. Initializes the object instance using the specified signature algorithm.

Write the key to the address retrieved by using the GetKeyBufferPrt function.

Parameters
[in]modeSpecifies the type of signature algorithm.
template<size_t KeySize>
nn::pia::common::SignatureSettingWithKeyBuffer< KeySize >::SignatureSettingWithKeyBuffer ( )
inline

Instantiates an object. The instance is initialized using the predefined signature algorithm (HMAC-MD5).

Write the key to the address retrieved by using the GetKeyBufferPrt function.

Member Function Documentation

template<size_t KeySize>
u8* nn::pia::common::SignatureSettingWithKeyBuffer< KeySize >::GetKeyBufferPtr ( )
inline

Gets a pointer to the key data buffer.

Returns
Returns a pointer to the key data buffer.
const void* nn::pia::common::SignatureSetting::GetKeyData ( ) const
inlineinherited

Gets the address of the key data that is currently specified.

Returns
Returns the address of the key data that is currently specified.
size_t nn::pia::common::SignatureSetting::GetKeySize ( ) const
inlineinherited

Gets the size of the key data that is currently specified.

Returns
Returns the address of the key data that is currently specified.
Mode nn::pia::common::SignatureSetting::GetMode ( ) const
inlineinherited

Gets the signature algorithm that is currently specified.

Returns
Returns the signature algorithm that is currently specified.
template<size_t KeySize>
nn::Result nn::pia::common::SignatureSettingWithKeyBuffer< KeySize >::SetMode ( Mode  mode)
inline

Sets the signature algorithm.

Parameters
[in]modeSpecifies the type of signature algorithm.
Returns
Returns a Result that indicates success if configured correctly.
Error Return Values:
ResultInvalidArgument Indicates an invalid argument. Programming error. Fix your program so that this error is not returned.