ConditionalCryptoProvider

class ConditionalCryptoProvider(enabledProvider: () -> Boolean, delegate: CryptoProvider) : CryptoProvider

Wraps a real crypto provider and turns it into a configuration-driven switch.

This supports "progressive enhancement": deployments can disable encryption for non-sensitive pilots, while still using the same code paths.

Constructors

Link copied to clipboard
constructor(enabledProvider: () -> Boolean, delegate: CryptoProvider)

Properties

Link copied to clipboard
open override val isEnabled: Boolean

Functions

Link copied to clipboard
open override fun decrypt(blob: ByteArray): ByteArray
Link copied to clipboard
open override fun encrypt(plain: ByteArray): ByteArray