1 implementation of IDataProtectionBuilder
Microsoft.AspNetCore.DataProtection (1)
Internal\DataProtectionBuilder.cs (1)
13internal sealed class DataProtectionBuilder : IDataProtectionBuilder
119 references to IDataProtectionBuilder
CustomEncryptorSample (2)
CustomBuilderExtensions.cs (2)
14public static IDataProtectionBuilder UseXmlEncryptor( 15this IDataProtectionBuilder builder,
KeyManagementSample (1)
Program.cs (1)
17var builder = serviceCollection
Microsoft.AspNetCore.DataProtection (95)
DataProtectionBuilderExtensions.cs (87)
26/// Extensions for configuring data protection using an <see cref="IDataProtectionBuilder"/>. 33/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 35/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 40public static IDataProtectionBuilder SetApplicationName(this IDataProtectionBuilder builder, string applicationName) 55/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 57/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 61public static IDataProtectionBuilder AddKeyEscrowSink(this IDataProtectionBuilder builder, IKeyEscrowSink sink) 78/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 79/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 83public static IDataProtectionBuilder AddKeyEscrowSink<TImplementation>(this IDataProtectionBuilder builder) 103/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 105/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 109public static IDataProtectionBuilder AddKeyEscrowSink(this IDataProtectionBuilder builder, Func<IServiceProvider, IKeyEscrowSink> factory) 129/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 131/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 132public static IDataProtectionBuilder AddKeyManagementOptions(this IDataProtectionBuilder builder, Action<KeyManagementOptions> setupAction) 144/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 145/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 150public static IDataProtectionBuilder DisableAutomaticKeyGeneration(this IDataProtectionBuilder builder) 165/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 167/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 168public static IDataProtectionBuilder PersistKeysToFileSystem(this IDataProtectionBuilder builder, DirectoryInfo directory) 188/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 190/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 192public static IDataProtectionBuilder PersistKeysToRegistry(this IDataProtectionBuilder builder, RegistryKey registryKey) 212/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 214/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 215public static IDataProtectionBuilder ProtectKeysWithCertificate(this IDataProtectionBuilder builder, X509Certificate2 certificate) 237/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 239/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 240public static IDataProtectionBuilder ProtectKeysWithCertificate(this IDataProtectionBuilder builder, string thumbprint) 271/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 273/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 274public static IDataProtectionBuilder UnprotectKeysWithAnyCertificate(this IDataProtectionBuilder builder, params X509Certificate2[] certificates) 296/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 297/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 302public static IDataProtectionBuilder ProtectKeysWithDpapi(this IDataProtectionBuilder builder) 313/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 317/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 322public static IDataProtectionBuilder ProtectKeysWithDpapi(this IDataProtectionBuilder builder, bool protectToLocalMachine) 343/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 344/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 350public static IDataProtectionBuilder ProtectKeysWithDpapiNG(this IDataProtectionBuilder builder) 362/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 366/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 375public static IDataProtectionBuilder ProtectKeysWithDpapiNG(this IDataProtectionBuilder builder, string protectionDescriptorRule, DpapiNGProtectionDescriptorFlags flags) 396/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 400/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 401public static IDataProtectionBuilder SetDefaultKeyLifetime(this IDataProtectionBuilder builder, TimeSpan lifetime) 422/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 424/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 425public static IDataProtectionBuilder UseCryptographicAlgorithms(this IDataProtectionBuilder builder, AuthenticatedEncryptorConfiguration configuration) 439/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 441/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 447public static IDataProtectionBuilder UseCustomCryptographicAlgorithms(this IDataProtectionBuilder builder, CngCbcAuthenticatedEncryptorConfiguration configuration) 461/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 463/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 469public static IDataProtectionBuilder UseCustomCryptographicAlgorithms(this IDataProtectionBuilder builder, CngGcmAuthenticatedEncryptorConfiguration configuration) 483/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 485/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 487public static IDataProtectionBuilder UseCustomCryptographicAlgorithms(this IDataProtectionBuilder builder, ManagedAuthenticatedEncryptorConfiguration configuration) 495private static IDataProtectionBuilder UseCryptographicAlgorithmsCore(IDataProtectionBuilder builder, AlgorithmConfiguration configuration) 511/// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> 512/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 517public static IDataProtectionBuilder UseEphemeralDataProtectionProvider(this IDataProtectionBuilder builder)
DataProtectionServiceCollectionExtensions.cs (3)
32public static IDataProtectionBuilder AddDataProtection(this IServiceCollection services) 49public static IDataProtectionBuilder AddDataProtection(this IServiceCollection services, Action<DataProtectionOptions> setupAction) 54var builder = services.AddDataProtection();
IDataProtectionBuilder.cs (4)
19/// <see cref="DataProtectionBuilderExtensions.ProtectKeysWithCertificate(IDataProtectionBuilder,string)" /> should generally be accompanied by 20/// a call to <see cref="DataProtectionBuilderExtensions.PersistKeysToFileSystem(IDataProtectionBuilder,DirectoryInfo)"/>, or exceptions may 26/// A call to <see cref="DataProtectionBuilderExtensions.UseCryptographicAlgorithms(IDataProtectionBuilder,AuthenticatedEncryptorConfiguration)"/> 27/// should therefore generally be paired with a call to <see cref="DataProtectionBuilderExtensions.PersistKeysToFileSystem(IDataProtectionBuilder,DirectoryInfo)"/>,
Internal\DataProtectionBuilder.cs (1)
11/// Default implementation of <see cref="IDataProtectionBuilder"/>.
Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (3)
EntityFrameworkCoreDataProtectionExtensions.cs (3)
22/// <param name="builder">The <see cref="IDataProtectionBuilder"/> instance to modify.</param> 24public static IDataProtectionBuilder PersistKeysToDbContext<TContext>(this IDataProtectionBuilder builder)
Microsoft.AspNetCore.DataProtection.Extensions (6)
DataProtectionProvider.cs (6)
54/// system. See <see cref="IDataProtectionBuilder"/> for more information.</param> 57Action<IDataProtectionBuilder> setupAction) 107/// system. See <see cref="IDataProtectionBuilder"/> for more information.</param> 111Action<IDataProtectionBuilder> setupAction, 123Action<IDataProtectionBuilder> setupAction, 128var builder = serviceCollection.AddDataProtection();
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (12)
RedisDataProtectionBuilderExtensions.cs (12)
14/// Contains Redis-specific extension methods for modifying a <see cref="IDataProtectionBuilder"/>. 26/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 27public static IDataProtectionBuilder PersistKeysToStackExchangeRedis(this IDataProtectionBuilder builder, Func<IDatabase> databaseFactory, RedisKey key) 39/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 40public static IDataProtectionBuilder PersistKeysToStackExchangeRedis(this IDataProtectionBuilder builder, IConnectionMultiplexer connectionMultiplexer) 51/// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> 52public static IDataProtectionBuilder PersistKeysToStackExchangeRedis(this IDataProtectionBuilder builder, IConnectionMultiplexer connectionMultiplexer, RedisKey key) 59private static IDataProtectionBuilder PersistKeysToStackExchangeRedisInternal(IDataProtectionBuilder builder, Func<IDatabase> databaseFactory, RedisKey key)