Class ErasableString
Represents a string that is pinned in memory and can be overwritten when finished with, limiting the time window where the stored value can be obtained.
Inheritance
Implements
Inherited Members
Namespace: Yort.OnlineEftpos
Assembly: cs.temp.dll.dll
Syntax
public sealed class ErasableString : IDisposable
Remarks
In theory this improves (but does not guarantee) security by reducing the amount of time an unencrypted credential is available in memory. No guarantees or promises are made about the security provided by this class.
Note, failure to explicitly dispose this class may reduce/eliminate it's effectiveness. Dispose() should be called as early as possible, but no earlier.
Constructors
Name | Description |
---|---|
ErasableString(String) | Full constructor. |
Properties
Name | Description |
---|---|
IsCleared | Returns true if the Clear() method has been called. |
IsDisposed | Returns true if the Dispose() method has been called. |
Value | Returns the value of the string. This will be a string of character zero, for the length of the original string, if it has been cleared. |
Methods
Name | Description |
---|---|
Clear() | Overwrites the string value contained by this instance with a series of character zero values. |
Dispose() | Disposes this instance. |