Tenantry ProAPI reference
ConnectionStringEncryptionOptions class
Namespace: Tenantry.Pro.Strategies.DatabasePerTenant · Package: Tenantry.Pro · API reference
Configures at-rest encryption for cached connection strings. Set via opts.Encryption.Mode = ... inside pro.UseDatabasePerTenant(...).
public sealed class ConnectionStringEncryptionOptionsProperties
AesKey
A 256-bit (32-byte) AES-256 symmetric key. Required when ConnectionStringEncryptionOptions.Mode is ConnectionStringEncryptionMode.AesKey. Do not store this value in source control. Load it from environment variables, Azure Key Vault, AWS Secrets Manager, or similar.
public byte[]? AesKey { get; set; }Value: byte[]
opts.Encryption.AesKey = Convert.FromBase64String(config["Tenantry:EncryptionKey"]!);Mode
The encryption mode. Default: ConnectionStringEncryptionMode.None (no encryption).
public ConnectionStringEncryptionMode Mode { get; set; }