Table of Contents

Interface IDataProtectionApi

Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime.dll

Provides methods for data protection

public interface IDataProtectionApi : IDslApi

Implements

IDslApi

Extension Methods

ObjectExtension.ConvertToBsonValue(object), EnumExtensions.DeepClone<IDataProtectionApi>(IDataProtectionApi)

Examples

var dataProtectionApi = ctx.Use<IDataProtectionApi>();
dataProtectionApi.Protect(value)

Methods

Protect(byte[])

Cryptographically protects a piece of plaintext data.

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.

string Protect(string plainText)

Parameters

plainText string

The plaintext to protect.

Returns

string

The cipher text of the plaintext.

Unprotect(byte[])

Cryptographically unprotects a piece of cipher data.

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.

string Unprotect(string cipherText)

Parameters

cipherText string

The cipher text to unprotect.

Returns

string

The plaintext form of the cipher text.