-
Notifications
You must be signed in to change notification settings - Fork 2
Hardening encryption key storage - Automigraete? #439
Copy link
Copy link
Closed
Description
Windows DPAPI (ProtectedData class) — best bang for buck in C#
csharp// Encrypt (only the current user/machine can decrypt)
byte[] encrypted = ProtectedData.Protect(
Encoding.UTF8.GetBytes(plainTextSecret),
null,
DataProtectionScope.LocalMachine // or CurrentUser
);
// Decrypt
string secret = Encoding.UTF8.GetString(
ProtectedData.Unprotect(encrypted, null, DataProtectionScope.LocalMachine)
);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels