Table of Contents

Method Create

Namespace
MailFathom.Infrastructure.DataEncryption
Assembly
MailFathom.Infrastructure.dll

Create(DataEncryptionPurpose, string)

Creates a binding.

public static DataEncryptionBinding Create(DataEncryptionPurpose purpose, string subject)

Parameters

purpose DataEncryptionPurpose

What the value is.

subject string

Whose the value is.

Returns

DataEncryptionBinding

The binding every seal and open of that value must use.

Exceptions

ArgumentNullException

Thrown when subject is null.

ArgumentException

Thrown when purpose is the unspecified struct default, when subject is empty, or when the subject carries the separator the associated data is composed with. Each is a defect in the caller rather than a configuration error: a value bound to nothing meaningful would still seal and would open under a binding nobody intended.