/// <summary> /// Configures the data protection system to encrypt keys using AWS Key Management Service master keys /// </summary> /// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> /// <param name="config">The configuration object specifying how to use KMS keys.</param> /// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> public static IDataProtectionBuilder ProtectKeysWithAwsKms(this IDataProtectionBuilder builder, IKmsXmlEncryptorConfig config) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } return(builder.ProtectKeysWithAwsKmsRaw(null, config)); }
/// <summary> /// Configures the data protection system to encrypt keys using AWS Key Management Service master keys /// </summary> /// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> /// <param name="kmsClient">KMS client configured with appropriate credentials.</param> /// <param name="config">The configuration object specifying how to use KMS keys.</param> /// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> public static IDataProtectionBuilder ProtectKeysWithAwsKms(this IDataProtectionBuilder builder, IAmazonKeyManagementService kmsClient, IKmsXmlEncryptorConfig config) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } if (kmsClient == null) { throw new ArgumentNullException(nameof(kmsClient)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } return(builder.ProtectKeysWithAwsKmsRaw(kmsClient, config)); }