Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static IDataProtectionBuilder AddCaDataProtection(this IServiceCollection services)
- {
- const string applicationName = "CertificationAuthority";
- var registryKey = Registry.CurrentUser.CreateSubKey($@"SOFTWARE{applicationName}keys");
- return services
- .AddDataProtection()
- .SetApplicationName(applicationName)
- .ProtectKeysWithDpapi()
- .PersistKeysToRegistry(registryKey);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement