IDataProtector Interface

An interface that can provide data protection services.

Namespace
Microsoft.AspNetCore.DataProtection
Assemblies
  • Microsoft.AspNetCore.DataProtection.Abstractions

Syntax

public interface IDataProtector : IDataProtectionProvider
interface Microsoft.AspNetCore.DataProtection.IDataProtector

Methods

Protect(System.Byte[])

Cryptographically protects a piece of plaintext data.

Arguments:plaintext (System.Byte<System.Byte>[]) – The plaintext data to protect.
Return type:System.Byte<System.Byte>[]
Returns:The protected form of the plaintext data.
byte[] Protect(byte[] plaintext)
Unprotect(System.Byte[])

Cryptographically unprotects a piece of protected data.

Arguments:protectedData (System.Byte<System.Byte>[]) – The protected data to unprotect.
Return type:System.Byte<System.Byte>[]
Returns:The plaintext form of the protected data.
byte[] Unprotect(byte[] protectedData)