Table of Contents

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

passphrase string

The 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

string

Passphrase

Supplies the passphrase used by the encryption strategy.

public string Passphrase { get; set; }

Property Value

string

Type

Identifies the serialized encryption strategy type.

[DataMember(Name = "type", EmitDefaultValue = false)]
public abstract string Type { get; }

Property Value

string

Methods

Decrypt(string)

Decrypts previously encrypted content.

public abstract string Decrypt(string ciphertext)

Parameters

ciphertext string

The encrypted payload.

Returns

string

The decrypted plaintext.

Encrypt(string)

Encrypts plaintext content.

public abstract string Encrypt(string plaintext)

Parameters

plaintext string

The plaintext to encrypt.

Returns

string

The encrypted payload.