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
purposeDataEncryptionPurposeWhat the value is.
subjectstringWhose the value is.
Returns
- DataEncryptionBinding
The binding every seal and open of that value must use.
Exceptions
- ArgumentNullException
Thrown when
subjectis null.- ArgumentException
Thrown when
purposeis the unspecified struct default, whensubjectis 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.