Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 716 Bytes

File metadata and controls

18 lines (12 loc) · 716 Bytes

Meziantou.Framework.SensitiveData

Meziantou.Framework.SensitiveData provides the SensitiveData class. This class represent sensitive data which should be difficult to accidentally disclose. But there's no effort to thwart intentional disclosure of these contents, such as through a debugger or memory dump utility.

using var secret = SensitiveData.Create<string>("secret");

// Reveal data
byte[] data = secret.RevealToArray();
string str = secret.RevealToString();

var buffer = new byte[10];
secret.RevealInto(buffer);

Additional resources