Public Member Functions

Celartem::SecureString Class Reference

#include <cel_securestring.h>

List of all members.

Public Member Functions

 SecureString (const String &inString=NullString)
 SecureString (const SecureString &inSecString)
 ~SecureString ()
SecureStringoperator= (const String &inString)
SecureStringoperator= (const SecureString &inSecString)
String getAsString () const
 operator String () const

Detailed Description

This class provides secure storage of the strings.
If your code managed to preserve any sensitive information such as usernames and passwords on memory, you had better use SecureString rather than String. Although this class does not provides any string manipulation functions, it stores the string in secure way. It is very useful when you implement your own CredentialProvider and CredentialInfo classes.

See also:
String, CredentialProvider, CredentialInfo

Constructor & Destructor Documentation

Celartem::SecureString::SecureString ( const String inString = NullString  ) 

This constructor initializes the instance with the specified string.

Parameters:
inString The string to be preserved in secure way.
Celartem::SecureString::SecureString ( const SecureString inSecString  ) 

This constructor copies the specified instance in secure way.

Parameters:
inSecString A SecureString instance to be duplicated.
Celartem::SecureString::~SecureString (  ) 

The destructor zeroclears the memory space that used by the instance to reduce security risks.


Member Function Documentation

String Celartem::SecureString::getAsString (  )  const

This function decrypts and returns the string in plain text.

Returns:
The string stored in the instance.
Celartem::SecureString::operator String (  )  const

This function enables implicit cast to the String instance.

SecureString& Celartem::SecureString::operator= ( const String inString  ) 

This function initializes the instance with the specified string.

Parameters:
inString The string to be preserved in secure way.
Returns:
Reference to the instance (*this).
SecureString& Celartem::SecureString::operator= ( const SecureString inSecString  ) 

This constructor copies the specified instance in secure way.

Parameters:
inSecString A SecureString instance to be duplicated.
Returns:
Reference to the instance (*this).

The documentation for this class was generated from the following file:

This document is made with doxygen 1.7.1 at Thu Feb 17 2011 15:40:18.
Caminova Logo