CTR Pia  4.11.3
Game Communication Engine
nn::pia::common::SignatureSetting Class Reference

This class maintains signature setting information. More...

+ Inheritance diagram for nn::pia::common::SignatureSetting:

Public Types

Public Member Functions

 SignatureSetting (Mode mode, const void *cpKeyData, size_t keySize)
 Instantiates an object. Initializes the object instance using the signature algorithm and key data specified. More...
 
 SignatureSetting (const void *cpKeyData, size_t keySize)
 Instantiates an object. Initializes the object using the predefined algorithm (HMAC-MD5) and the specified key data. More...
 
 SignatureSetting ()
 Instantiates an object. Initializes the instance without a signature.
 
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 Set (Mode mode, const void *cpKeyData, size_t keySize)
 Sets signature settings. 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

This class maintains signature setting information.


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

nn::pia::common::SignatureSetting::SignatureSetting ( Mode  mode,
const void *  cpKeyData,
size_t  keySize 
)

Instantiates an object. Initializes the object instance using the signature algorithm and key data specified.

Parameters
[in]modeSpecifies the type of signature algorithm.
[in]cpKeyDataSpecifies the address of the signature data. Data being referenced must be maintained until this instance is destroyed or reinitialized.
[in]keySizeSpecifies the size of the key data, in bytes.
nn::pia::common::SignatureSetting::SignatureSetting ( const void *  cpKeyData,
size_t  keySize 
)

Instantiates an object. Initializes the object using the predefined algorithm (HMAC-MD5) and the specified key data.

Parameters
[in]cpKeyDataSpecifies the address of the signature data. Data being referenced must be maintained until this instance is destroyed or reinitialized.
[in]keySizeSpecifies the size of the key data, in bytes.

Member Function Documentation

const void* nn::pia::common::SignatureSetting::GetKeyData ( ) const
inline

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
inline

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
inline

Gets the signature algorithm that is currently specified.

Returns
Returns the signature algorithm that is currently specified.
nn::Result nn::pia::common::SignatureSetting::Set ( Mode  mode,
const void *  cpKeyData,
size_t  keySize 
)

Sets signature settings.

Parameters
[in]modeSpecifies the type of signature algorithm.
[in]cpKeyDataSpecifies the address of the signature data. Data being referenced must be maintained until this instance is destroyed or reinitialized.
[in]keySizeSpecifies the size of the key data, in bytes.
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.