Class EncryptionStrategy
- Namespace
- C4.Net.Encryption
- Assembly
- C4.Net.Client.dll
Defines the contract for client-side workspace encryption strategies.
[DataContract]
public abstract class EncryptionStrategy
- Inheritance
-
EncryptionStrategy
- Derived
- Inherited Members
Constructors
EncryptionStrategy()
Initializes an empty encryption strategy for serializers.
public EncryptionStrategy()
EncryptionStrategy(string)
Initializes an encryption strategy with a passphrase.
public EncryptionStrategy(string passphrase)
Parameters
passphrasestringThe passphrase used by the strategy.
Properties
Location
Identifies the encryption location expected by Structurizr.
[DataMember(Name = "location", EmitDefaultValue = false)]
public string Location { get; }
Property Value
Passphrase
Supplies the passphrase used by the encryption strategy.
public string Passphrase { get; set; }
Property Value
Type
Identifies the serialized encryption strategy type.
[DataMember(Name = "type", EmitDefaultValue = false)]
public abstract string Type { get; }
Property Value
Methods
Decrypt(string)
Decrypts previously encrypted content.
public abstract string Decrypt(string ciphertext)
Parameters
ciphertextstringThe encrypted payload.
Returns
- string
The decrypted plaintext.
Encrypt(string)
Encrypts plaintext content.
public abstract string Encrypt(string plaintext)
Parameters
plaintextstringThe plaintext to encrypt.
Returns
- string
The encrypted payload.