Main Page | Class List | File List | Class Members

RadiusSecret Class Reference

RADIUS secret key. More...

#include <RadiusSecret.h>

List of all members.

Public Member Functions

 RadiusSecret ()
 Constructor.
 RadiusSecret (const char *p_string)
 Constructor.
 RadiusSecret (const RadiusSecret &other)
 Copy constructor.
int getSecret (const unsigned char *&p_data, uint16_t &p_length)
 Get secret key.
int setSecret (const unsigned char *p_data, uint16_t p_length)
 Set secret key.

Private Attributes

unsigned char m_secret [D_SECRET_MAX_LENGTH]
 Secret key data.
uint16_t m_secretLength
 Secret key length.


Detailed Description

RADIUS secret key.


Constructor & Destructor Documentation

RadiusSecret::RadiusSecret const char *  p_string  ) 
 

Constructor.

Construct secret key from NULL-terminated string (NULL terminator is not copied into the key). If you need to create secret key with non-readable characters, use setSecretKey() method instead.

Parameters:
int] p_string - NULL-terminated string


Member Function Documentation

int RadiusSecret::getSecret const unsigned char *&  p_data,
uint16_t &  p_length
 

Get secret key.

Get secret key. Note that secret key may contain not-readable characters and should not be null-terminated. Hence application should not use strcpy()-like functions on the returned value.

Parameters:
[out] p_data - pointer to the secret data
[out] p_length - length of secret key
Returns:
RC_SUCCESS or RC_FAIL

int RadiusSecret::setSecret const unsigned char *  p_data,
uint16_t  p_length
 

Set secret key.

Set secret key. Note that secret key may contain not-readable characters and should not be null-terminated.

Parameters:
[in] p_data - pointer to the secret data
[in] p_length - length of secret key
Returns:
RC_SUCCESS or RC_FAIL


The documentation for this class was generated from the following files:
Generated on Tue Aug 11 18:35:07 2009 for ace-radius by doxygen 1.3.7-20040704