![]() |
VOOZH | about |
dotnet add package System.Security.Cryptography.ProtectedData --version 10.0.9
NuGet\Install-Package System.Security.Cryptography.ProtectedData -Version 10.0.9
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="10.0.9" />
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="10.0.9" />Directory.Packages.props
<PackageReference Include="System.Security.Cryptography.ProtectedData" />Project file
paket add System.Security.Cryptography.ProtectedData --version 10.0.9
#r "nuget: System.Security.Cryptography.ProtectedData, 10.0.9"
#:package System.Security.Cryptography.ProtectedData@10.0.9
#addin nuget:?package=System.Security.Cryptography.ProtectedData&version=10.0.9Install as a Cake Addin
#tool nuget:?package=System.Security.Cryptography.ProtectedData&version=10.0.9Install as a Cake Tool
System.Security.Cryptography.ProtectedData offers a simplified interface for utilizing Microsoft Windows DPAPI's CryptProtectData and CryptUnprotectData functions.
Note: Since it relies on Windows DPAPI, this package is only supported on Windows platforms. For more complex cryptographic operations or cross-platform support, consider the System.Security.Cryptography namespace.
Utilizing this package is quite simple, and it mainly revolves around two methods: Protect and Unprotect.
Here, originalData is the data you want to protect, optionalEntropy is an additional byte array used to increase encryption complexity, and DataProtectionScope specifies whether the data protection should apply to the current user or the machine.
using System.Security.Cryptography;
using System.Text;
byte[] originalData = Encoding.UTF8.GetBytes("This is a secret");
byte[] optionalEntropy = new byte[64];
Random.Shared.NextBytes(optionalEntropy);
// To protect:
byte[] encryptedData = ProtectedData.Protect(
originalData,
optionalEntropy,
DataProtectionScope.CurrentUser);
// To unprotect:
byte[] decryptedData = ProtectedData.Unprotect(
encryptedData,
optionalEntropy,
DataProtectionScope.CurrentUser);
The main type provided by this library is:
System.Security.Cryptography.ProtectedDataSystem.Security.Cryptography.ProtectedData is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. monoandroid10 monoandroid10 is compatible. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. monotouch10 monotouch10 is compatible. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. xamarinios10 xamarinios10 is compatible. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. xamarinmac20 xamarinmac20 is compatible. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. xamarintvos10 xamarintvos10 is compatible. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. xamarinwatchos10 xamarinwatchos10 is compatible. |
Showing the top 5 NuGet packages that depend on System.Security.Cryptography.ProtectedData:
| Package | Downloads |
|---|---|
|
System.Configuration.ConfigurationManager
Provides types that support using XML configuration files (app.config). This package exists only to support migrating existing .NET Framework code that already uses System.Configuration. When writing new code, use another configuration system instead, such as Microsoft.Extensions.Configuration. |
|
|
Microsoft.Identity.Client.Extensions.Msal
This package contains the public client (desktop) caching to Microsoft Authentication Library for .NET (MSAL.NET) |
|
|
Microsoft.Build
This package contains the Microsoft.Build assembly which is used to create, edit, and evaluate MSBuild projects. |
|
|
Microsoft.Build.Utilities.Core
This package contains the Microsoft.Build.Utilities assembly which is used to implement custom MSBuild tasks. |
|
|
NuGet.Configuration
NuGet's configuration settings implementation. |
Showing the top 20 popular GitHub repositories that depend on System.Security.Cryptography.ProtectedData:
| Repository | Stars |
|---|---|
|
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
|
|
|
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
|
|
|
rocksdanister/lively
Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
|
|
|
Jackett/Jackett
API Support for your favorite torrent trackers
|
|
|
JustArchiNET/ArchiSteamFarm
C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
|
|
|
PixiEditor/PixiEditor
PixiEditor is a Universal Editor for all your 2D needs
|
|
|
actions/runner
The Runner for GitHub Actions :rocket:
|
|
|
PhilippC/keepass2android
Password manager app for Android
|
|
|
Azure/azure-sdk-for-net
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
|
|
|
win-acme/win-acme
Automate SSL/TLS certificates on Windows with ease
|
|
|
microsoft/perfview
PerfView is a CPU and memory performance-analysis tool
|
|
|
GlitchEnzo/NuGetForUnity
A NuGet Package Manager for Unity
|
|
|
HotCakeX/Harden-Windows-Security
Harden Windows Safely, Securely using Official Supported Microsoft methods and proper explanation | Always up-to-date and works with the latest build of Windows | Provides tools and Guides for Personal, Enterprise, Government and Military security levels | SLSA Level 3 Compliant for Secure Development and Build Process | Apps Available on MS Store✨
|
|
|
cyanfish/naps2
Scan documents to PDF and more, as simply as possible.
|
|
|
ravendb/ravendb
ACID Document Database
|
|
|
PCL-Community/PCL-CE
PCL 社区版 由社区开发者维护与管理
|
|
|
dotnet/sdk
Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
|
|
|
ProtonVPN/win-app
Official ProtonVPN Windows app
|
|
|
googleprojectzero/sandbox-attacksurface-analysis-tools
Set of tools to analyze Windows sandboxes for exposed attack surface.
|
|
|
Nethereum/Nethereum
Ethereum .Net cross platform integration library
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.5.26302.115 | 2,535 | 6/9/2026 |
| 11.0.0-preview.4.26230.115 | 12,934 | 5/12/2026 |
| 11.0.0-preview.3.26207.106 | 10,451 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 8,715 | 3/10/2026 |
| 11.0.0-preview.1.26104.118 | 12,222 | 2/10/2026 |
| 10.0.9 | 628,838 | 6/9/2026 |
| 10.0.8 | 2,719,196 | 5/12/2026 |
| 10.0.7 | 2,421,976 | 4/21/2026 |
| 10.0.6 | 1,034,590 | 4/14/2026 |
| 10.0.5 | 4,181,803 | 3/12/2026 |
| 10.0.4 | 440,365 | 3/10/2026 |
| 10.0.3 | 3,544,454 | 2/10/2026 |
| 10.0.2 | 4,268,645 | 1/13/2026 |
| 10.0.1 | 4,748,792 | 12/9/2025 |
| 9.0.17 | 21,282 | 6/9/2026 |
| 9.0.16 | 133,499 | 5/12/2026 |
| 9.0.15 | 485,448 | 4/14/2026 |
| 9.0.14 | 352,848 | 3/10/2026 |
| 9.0.13 | 6,885,104 | 2/10/2026 |
| 9.0.12 | 363,758 | 1/13/2026 |