DataProtectionBuilderExtensions 类

定义

用于使用 配置数据保护的 IDataProtectionBuilder扩展。

public ref class DataProtectionBuilderExtensions abstract sealed
public static class DataProtectionBuilderExtensions
type DataProtectionBuilderExtensions = class
Public Module DataProtectionBuilderExtensions
继承
DataProtectionBuilderExtensions

方法

AddKeyEscrowSink(IDataProtectionBuilder, Func<IServiceProvider,IKeyEscrowSink>)

注册 , IKeyEscrowSink 以在将密钥保存到存储之前执行托管。

AddKeyEscrowSink(IDataProtectionBuilder, IKeyEscrowSink)

注册 , IKeyEscrowSink 以在将密钥保存到存储之前执行托管。

AddKeyEscrowSink<TImplementation>(IDataProtectionBuilder)

注册 , IKeyEscrowSink 以在将密钥保存到存储之前执行托管。

AddKeyManagementOptions(IDataProtectionBuilder, Action<KeyManagementOptions>)

配置数据保护系统的密钥管理选项。

DisableAutomaticKeyGeneration(IDataProtectionBuilder)

将数据保护系统配置为不自动生成新密钥。

PersistKeysToFileSystem(IDataProtectionBuilder, DirectoryInfo)

将数据保护系统配置为将密钥保存到指定目录。 此路径可能位于本地计算机上,也可以指向 UNC 共享。

PersistKeysToRegistry(IDataProtectionBuilder, RegistryKey)

将数据保护系统配置为将密钥保存到 Windows 注册表。

ProtectKeysWithCertificate(IDataProtectionBuilder, String)

将密钥配置为在保存到存储之前加密到给定证书。

ProtectKeysWithCertificate(IDataProtectionBuilder, X509Certificate2)

将密钥配置为在保存到存储之前加密到给定证书。

ProtectKeysWithDpapi(IDataProtectionBuilder)

将密钥配置为在保存到存储之前使用 Windows DPAPI 加密。 加密密钥只能由当前 Windows 用户帐户解密。

ProtectKeysWithDpapi(IDataProtectionBuilder, Boolean)

将密钥配置为在保存到存储之前使用 Windows DPAPI 加密。

ProtectKeysWithDpapiNG(IDataProtectionBuilder)

将密钥配置为在保存到存储之前使用 Windows CNG DPAPI 进行加密。 密钥将由当前 Windows 用户帐户解密。

ProtectKeysWithDpapiNG(IDataProtectionBuilder, String, DpapiNGProtectionDescriptorFlags)

将密钥配置为在保存到存储之前使用 Windows CNG DPAPI 进行加密。

SetApplicationName(IDataProtectionBuilder, String)

设置数据保护系统中此应用程序的唯一名称。

SetDefaultKeyLifetime(IDataProtectionBuilder, TimeSpan)

设置数据保护系统创建的密钥的默认生存期。

UnprotectKeysWithAnyCertificate(IDataProtectionBuilder, X509Certificate2[])

配置可用于解密从存储加载的密钥的证书。

UseCryptographicAlgorithms(IDataProtectionBuilder, AuthenticatedEncryptionSettings)

将数据保护系统配置为在生成受保护的有效负载时默认使用指定的加密算法。

UseCryptographicAlgorithms(IDataProtectionBuilder, AuthenticatedEncryptorConfiguration)

将数据保护系统配置为在生成受保护的有效负载时默认使用指定的加密算法。

UseCustomCryptographicAlgorithms(IDataProtectionBuilder, CngCbcAuthenticatedEncryptionSettings)

将数据保护系统配置为使用自定义 Windows CNG 算法。 此 API 适用于开发人员无法使用 和 ValidationAlgorithm 枚举中指定的EncryptionAlgorithm算法的高级方案。

UseCustomCryptographicAlgorithms(IDataProtectionBuilder, CngCbcAuthenticatedEncryptorConfiguration)

将数据保护系统配置为使用自定义 Windows CNG 算法。 此 API 适用于开发人员无法使用 和 ValidationAlgorithm 枚举中指定的EncryptionAlgorithm算法的高级方案。

UseCustomCryptographicAlgorithms(IDataProtectionBuilder, CngGcmAuthenticatedEncryptionSettings)

将数据保护系统配置为使用自定义 Windows CNG 算法。 此 API 适用于开发人员无法使用 和 ValidationAlgorithm 枚举中指定的EncryptionAlgorithm算法的高级方案。

UseCustomCryptographicAlgorithms(IDataProtectionBuilder, CngGcmAuthenticatedEncryptorConfiguration)

将数据保护系统配置为使用自定义 Windows CNG 算法。 此 API 适用于开发人员无法使用 和 ValidationAlgorithm 枚举中指定的EncryptionAlgorithm算法的高级方案。

UseCustomCryptographicAlgorithms(IDataProtectionBuilder, ManagedAuthenticatedEncryptionSettings)

将数据保护系统配置为使用自定义算法。 此 API 适用于开发人员无法使用 和 ValidationAlgorithm 枚举中指定的EncryptionAlgorithm算法的高级方案。

UseCustomCryptographicAlgorithms(IDataProtectionBuilder, ManagedAuthenticatedEncryptorConfiguration)

将数据保护系统配置为使用自定义算法。 此 API 适用于开发人员无法使用 和 ValidationAlgorithm 枚举中指定的EncryptionAlgorithm算法的高级方案。

UseEphemeralDataProtectionProvider(IDataProtectionBuilder)

将数据保护系统配置为将 用于 EphemeralDataProtectionProvider 数据保护服务。

适用于