ProtectedData.TryProtect Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
C#
public static bool TryProtect(ReadOnlySpan<byte> userData, System.Security.Cryptography.DataProtectionScope scope, Span<byte> destination, out int bytesWritten, ReadOnlySpan<byte> optionalEntropy = default);
static member TryProtect : ReadOnlySpan<byte> * System.Security.Cryptography.DataProtectionScope * Span<byte> * int * ReadOnlySpan<byte> -> bool
Public Shared Function TryProtect (userData As ReadOnlySpan(Of Byte), scope As DataProtectionScope, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional optionalEntropy As ReadOnlySpan(Of Byte) = Nothing) As Boolean
- userData
- ReadOnlySpan<Byte>
- scope
- DataProtectionScope
- bytesWritten
- Int32
- optionalEntropy
- ReadOnlySpan<Byte>
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
Windows Desktop | 10 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: