1 implementation of IDataProtectionBuilder
Microsoft.AspNetCore.DataProtection (1)
Internal\DataProtectionBuilder.cs (1)
13
internal sealed class DataProtectionBuilder :
IDataProtectionBuilder
119 references to IDataProtectionBuilder
CustomEncryptorSample (2)
CustomBuilderExtensions.cs (2)
14
public static
IDataProtectionBuilder
UseXmlEncryptor(
15
this
IDataProtectionBuilder
builder,
KeyManagementSample (1)
Program.cs (1)
17
var
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>
40
public 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>
61
public 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>
83
public 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>
109
public 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>
132
public 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>
150
public 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>
168
public 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>
192
public 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>
215
public 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>
240
public 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>
274
public 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>
302
public 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>
322
public 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>
350
public 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>
375
public 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>
401
public 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>
425
public 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>
447
public 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>
469
public 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>
487
public static
IDataProtectionBuilder
UseCustomCryptographicAlgorithms(this
IDataProtectionBuilder
builder, ManagedAuthenticatedEncryptorConfiguration configuration)
495
private 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>
517
public static
IDataProtectionBuilder
UseEphemeralDataProtectionProvider(this
IDataProtectionBuilder
builder)
DataProtectionServiceCollectionExtensions.cs (3)
32
public static
IDataProtectionBuilder
AddDataProtection(this IServiceCollection services)
49
public static
IDataProtectionBuilder
AddDataProtection(this IServiceCollection services, Action<DataProtectionOptions> setupAction)
54
var
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>
24
public 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>
57
Action<
IDataProtectionBuilder
> setupAction)
107
/// system. See <see cref="
IDataProtectionBuilder
"/> for more information.</param>
111
Action<
IDataProtectionBuilder
> setupAction,
123
Action<
IDataProtectionBuilder
> setupAction,
128
var
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>
27
public 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>
40
public static
IDataProtectionBuilder
PersistKeysToStackExchangeRedis(this
IDataProtectionBuilder
builder, IConnectionMultiplexer connectionMultiplexer)
51
/// <returns>A reference to the <see cref="
IDataProtectionBuilder
" /> after this operation has completed.</returns>
52
public static
IDataProtectionBuilder
PersistKeysToStackExchangeRedis(this
IDataProtectionBuilder
builder, IConnectionMultiplexer connectionMultiplexer, RedisKey key)
59
private static
IDataProtectionBuilder
PersistKeysToStackExchangeRedisInternal(
IDataProtectionBuilder
builder, Func<IDatabase> databaseFactory, RedisKey key)