/// <summary> /// Initializes a new instance of the <see cref="CosmosDataEncryptionKeyProvider"/> class. /// </summary> /// <param name="encryptionKeyWrapProvider">A provider that will be used to wrap (encrypt) and unwrap (decrypt) data encryption keys for envelope based encryption</param> /// <param name="dekPropertiesTimeToLive">Time to live for DEK properties before having to refresh.</param> public CosmosDataEncryptionKeyProvider( EncryptionKeyWrapProvider encryptionKeyWrapProvider, TimeSpan?dekPropertiesTimeToLive = null) { this.EncryptionKeyWrapProvider = encryptionKeyWrapProvider ?? throw new ArgumentNullException(nameof(encryptionKeyWrapProvider)); this.dataEncryptionKeyContainerCore = new DataEncryptionKeyContainerCore(this); this.DekCache = new DekCache(dekPropertiesTimeToLive); }
public CosmosDataEncryptionKeyProvider( EncryptionKeyWrapProvider encryptionKeyWrapProvider, TimeSpan?dekPropertiesTimeToLive = null) { this.EncryptionKeyWrapProvider = encryptionKeyWrapProvider; this.dataEncryptionKeyContainerCore = new DataEncryptionKeyContainerCore(this); this.DekCache = new DekCache(dekPropertiesTimeToLive); }
public DataEncryptionKeyContainerInlineCore(DataEncryptionKeyContainerCore dataEncryptionKeyContainerCore) { if (dataEncryptionKeyContainerCore == null) { throw new ArgumentNullException(nameof(dataEncryptionKeyContainerCore)); } this.dataEncryptionKeyContainerCore = dataEncryptionKeyContainerCore; }