Class DataProtectionApi
Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime.dll
public class DataProtectionApi : IDataProtectionApi, IDslApi
Inheritance
Implements
Inherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
Extension Methods
ObjectExtension.ConvertToBsonValue(object), EnumExtensions.DeepClone<DataProtectionApi>(DataProtectionApi)
Constructors
DataProtectionApi(IDataProtector)
public DataProtectionApi(IDataProtector dataProtector)
Parameters
dataProtector
IDataProtector
Methods
Protect(byte[])
Cryptographically protects a piece of plaintext data.
public byte[] Protect(byte[] plainData)
Parameters
plainData
byte[]
The plaintext data to protect.
Returns
byte[]
The protected form of the plaintext data.
Protect(string)
Cryptographically protects a piece of plaintext data.
public string Protect(string plainText)
Parameters
plainText
string
The plaintext to protect.
Returns
The cipher text of the plaintext.
Unprotect(byte[])
Cryptographically unprotects a piece of cipher data.
public byte[] Unprotect(byte[] cipherData)
Parameters
cipherData
byte[]
The protected data to unprotect.
Returns
byte[]
The plaintext form of the protected data.
Unprotect(string)
Cryptographically unprotects a piece of cipher text.
public string Unprotect(string cipherText)
Parameters
cipherText
string
The cipher text to unprotect.
Returns
The plaintext form of the cipher text.