SymmetricEncryptionAttribute

SymmetricEncryptionAttribute class

Instructs instances serialization to encrypt / decrypt object serialization string.

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public sealed class SymmetricEncryptionAttribute : Attribute, IDataEncryption

Constructors

Name Description
SymmetricEncryptionAttribute(SymmetricAlgorithmType, string) Creates symmetric algorithm with parameters and default passphrase.
SymmetricEncryptionAttribute(SymmetricAlgorithmType, string, string) Creates symmetric algorithm with parameters.

Methods

Name Description
Decode(string) Decrypts passed string based on algorithm type, key and salt parameters
Encode(string) Encrypts string based on provided algorithm type, key and salt parameters

See Also