/// <summary> /// Configures a container for encryption with the specified encryption component. Every registered converter will be /// wrapped with a converter which will further encrypt its reading and writing. /// </summary> /// <param name="this">The container to configure for encryption.</param> /// <param name="encryption">The encryption with which to encrypt and decrypt data.</param> /// <returns>A configured IConfigurationContainer.</returns> public static IConfigurationContainer UseEncryptionAlgorithm(this IConfigurationContainer @this, IEncryption encryption) => @this.UseEncryptionAlgorithm(new EncryptionConverterAlteration(encryption));
/// <summary> /// Configures a container for default encryption, which is base-64. Every registered converter will be wrapped with /// a converter which will further encrypt its reading and writing. /// </summary> /// <param name="this">The container to configure for encryption.</param> /// <returns>A configured IConfigurationContainer.</returns> public static IConfigurationContainer UseEncryptionAlgorithm(this IConfigurationContainer @this) => @this.UseEncryptionAlgorithm(EncryptionConverterAlteration.Default);