<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="5.0.0-rc.2.20475.5" />

ProtectedData

public static class ProtectedData
Provides methods for encrypting and decrypting data. This class cannot be inherited.
using System.Runtime.CompilerServices; namespace System.Security.Cryptography { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public static class ProtectedData { public static byte[] Protect(byte[] userData, [System.Runtime.CompilerServices.Nullable(2)] byte[] optionalEntropy, DataProtectionScope scope) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_CryptographyProtectedData); } public static byte[] Unprotect(byte[] encryptedData, [System.Runtime.CompilerServices.Nullable(2)] byte[] optionalEntropy, DataProtectionScope scope) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_CryptographyProtectedData); } } }