#include <cel_securestring.h>
Public Member Functions | |
SecureString (NULL_STRING null) | |
SecureString (const String &inString=NullString) | |
SecureString (const SecureString &inSecString) | |
~SecureString () | |
SecureString & | operator= (NULL_STRING null) |
SecureString & | operator= (const String &inString) |
SecureString & | operator= (const SecureString &inSecString) |
String | getAsString () const |
operator String () const | |
bool | isEmpty () const |
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.
Celartem::SecureString::SecureString | ( | NULL_STRING | null | ) |
This constructor initializes the instance with empty string.
null | It should be NullString. |
Celartem::SecureString::SecureString | ( | const String & | inString = NullString | ) |
This constructor initializes the instance with the specified string.
inString | The string to be preserved in secure way. |
Celartem::SecureString::SecureString | ( | const SecureString & | inSecString | ) |
This constructor copies the specified instance in secure way.
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.
String Celartem::SecureString::getAsString | ( | ) | const |
This function decrypts and returns the string in plain text.
bool Celartem::SecureString::isEmpty | ( | ) | const |
This method verifies the string is empty or not.
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.
null | It should be NullString. |
SecureString& Celartem::SecureString::operator= | ( | const String & | inString | ) |
This function initializes the instance with the specified string.
inString | The string to be preserved in secure way. |
SecureString& Celartem::SecureString::operator= | ( | const SecureString & | inSecString | ) |
This constructor copies the specified instance in secure way.
inSecString | A SecureString instance to be duplicated. |