Skip to content

ProtectedData.Protect(byte[], byte[]?, DataProtectionScope) method

Defined in

Type: ProtectedData Namespace: Akavache Assembly: Akavache.Core.dll

Applies to

net9.0, net9.0-maccatalyst18.0, net9.0-macos15.0, net9.0-tvos18.0, net9.0-android35.0, net9.0-ios18.0, net8.0, net8.0-android34.0, net8.0-macos14.5, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-tvos17.2, netstandard2.1, netstandard2.0

public static byte[] Protect(byte[] originalData, byte[]? entropy, DataProtectionScope scope = CurrentUser)

View source

Summary: Protected the specified data.

Parameters

NameTypeDescription
originalDatabyte[]The original data being passed.
entropybyte[]?Entropy to help with randomness.
scope = 0[DataProtectionScope](#The scope where to store the data.

Returns: byte[] -- The original data.