CVR Manager 1.0.0

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Exterrata
2026-10-25 02:46:35 -04:00
commit 9bb4f85802
59 changed files with 7913 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
using System.Security.Cryptography;
using System.Text;
namespace CVRManager.Services;
public static class TokenVault
{
public static string Protect(string token) =>
Convert.ToBase64String(ProtectedData.Protect(Encoding.UTF8.GetBytes(token), null, DataProtectionScope.CurrentUser));
public static string Unprotect(string stored)
{
if (string.IsNullOrEmpty(stored)) return "";
try { return Encoding.UTF8.GetString(ProtectedData.Unprotect(Convert.FromBase64String(stored), null, DataProtectionScope.CurrentUser)); }
catch { return ""; }
}
}