Public Member Functions | List of all members
Celartem::SecureString Class Reference

#include <cel_securestring.h>

Public Member Functions

 SecureString (NULL_STRING null)
 
 SecureString (const String &inString=NullString)
 
 SecureString (const SecureString &inSecString)
 
 ~SecureString ()
 
SecureStringoperator= (NULL_STRING null)
 
SecureStringoperator= (const String &inString)
 
SecureStringoperator= (const SecureString &inSecString)
 
String getAsString () const
 
 operator String () const
 
bool isEmpty () 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 ( NULL_STRING  null)

This constructor initializes the instance with empty string.

Parameters
nullIt should be NullString.
Celartem::SecureString::SecureString ( const String inString = NullString)

This constructor initializes the instance with the specified string.

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

This constructor copies the specified instance in secure way.

Parameters
inSecStringA 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.
bool Celartem::SecureString::isEmpty ( ) const

This method verifies the string is empty or not.

Returns
true if the string is empty, otherwise false.
Celartem::SecureString::operator String ( ) const

This function enables implicit cast to the String instance.

SecureString& Celartem::SecureString::operator= ( NULL_STRING  null)

This function initializes the instance with empty string.

Parameters
nullIt should be NullString.
Returns
Reference to the instance (*this).
SecureString& Celartem::SecureString::operator= ( const String inString)

This function initializes the instance with the specified string.

Parameters
inStringThe 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
inSecStringA SecureString instance to be duplicated.
Returns
Reference to the instance (*this).

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

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:06.
Cuminas Logo