public override void Initialize() { var settingsDocument = Database.Get(Constants.EncryptionSettingsDocumentKey, null); RavenJObject json; if (settingsDocument != null) { json = settingsDocument.DataAsJson; } else { json = JsonExtensions.ToJObject(new EncryptionSettings()); Database.Put(Constants.EncryptionSettingsDocumentKey, null, json, new RavenJObject(), null); } EncryptionSettings = json.JsonDeserialization<EncryptionSettings>(); }
/// <inheritdoc cref="IConsumerEndpointBuilder{TBuilder}.Decrypt" /> public TBuilder Decrypt(EncryptionSettings encryptionSettings) => WithEncryption(Check.NotNull(encryptionSettings, nameof(encryptionSettings)));