<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="10.0.0" />

System.Security.Cryptography.ProtectedData

public static class ProtectedData
Provides methods for encrypting and decrypting data. This class cannot be inherited.
namespace System.Security.Cryptography { public static class ProtectedData { public static byte[] Protect(byte[] userData, byte[] optionalEntropy, DataProtectionScope scope); public static byte[] Unprotect(byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope); } }