System::Security::SecureString class

SecureString class

Secure string, represents text that should be kept confidential. This class DON’T ENCRYPTING the internal data. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class SecureString : public System::IDisposable

Methods

MethodDescription
AppendChar(char16_t)Appends a character to the end of the string.
Clear()Delete all characters from the current secure string.
Copy() constCreates a duplicate of this secure string.
Dispose() overrideRelease all resources used by the current object.
get_Length() constGets number of characters in this secure string.
InsertAt(int32_t, char16_t)Inserts a character at the specified index.
IsReadOnly() constGets flag that indicates whether this object is marked read-only.
MakeReadOnly()Makes this secure string read-only.
operator=(const SecureString&)
RemoveAt(int32_t)Removes the character at the specified position.
SecureString()RTTI information.
SecureString(const char16_t *, int32_t)Constructor.
SecureString(const SecureString&)
SetAt(int32_t, char16_t)Replaces the existing character at the specified position.
ToUnsecureString() constCopies contents of this secure string into unsecure String object. Use with caution.
~SecureString()Destructor.

See Also