Microsoft.AspNetCore.DataProtection
14 wrapped types. Load them with using { "Microsoft.AspNetCore.DataProtection" }. Click a class to open it.
DataProtectionAdvancedExtensions class static
Microsoft.AspNetCore.DataProtection.DataProtectionAdvancedExtensions · assembly Microsoft.AspNetCore.DataProtection.Extensions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Protect | Protect(p1,p2,p3) | static byte[] Protect(ITimeLimitedDataProtector protector, byte[] plaintext, TimeSpan lifetime)static string Protect(ITimeLimitedDataProtector protector, string plaintext, DateTimeOffset expiration)static string Protect(ITimeLimitedDataProtector protector, string plaintext, TimeSpan lifetime) |
ToTimeLimitedDataProtector | ToTimeLimitedDataProtector(p1) | static ITimeLimitedDataProtector ToTimeLimitedDataProtector(IDataProtector protector) |
Unprotect | Unprotect(p1,p2) | static string Unprotect(ITimeLimitedDataProtector protector, string protectedData, out DateTimeOffset expiration) |
DataProtectionBuilderExtensions class static
Microsoft.AspNetCore.DataProtection.DataProtectionBuilderExtensions · assembly Microsoft.AspNetCore.DataProtection
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
AddKeyEscrowSink | AddKeyEscrowSink(value)AddKeyEscrowSink([ :builder = … ])AddKeyEscrowSink([ :builder = …, :sink = … ])AddKeyEscrowSink([ :builder = …, :factory = … ]) | static IDataProtectionBuilder AddKeyEscrowSink(IDataProtectionBuilder builder, IKeyEscrowSink sink)static IDataProtectionBuilder AddKeyEscrowSink<TImplementation>(IDataProtectionBuilder builder)static IDataProtectionBuilder AddKeyEscrowSink(IDataProtectionBuilder builder, Func<IServiceProvider, IKeyEscrowSink> factory) |
AddKeyManagementOptions | AddKeyManagementOptions(p1,p2) | static IDataProtectionBuilder AddKeyManagementOptions(IDataProtectionBuilder builder, Action<KeyManagementOptions> setupAction) |
DisableAutomaticKeyGeneration | DisableAutomaticKeyGeneration(p1) | static IDataProtectionBuilder DisableAutomaticKeyGeneration(IDataProtectionBuilder builder) |
PersistKeysToFileSystem | PersistKeysToFileSystem(p1,p2) | static IDataProtectionBuilder PersistKeysToFileSystem(IDataProtectionBuilder builder, DirectoryInfo directory) |
PersistKeysToRegistry | PersistKeysToRegistry(p1,p2) | static IDataProtectionBuilder PersistKeysToRegistry(IDataProtectionBuilder builder, RegistryKey registryKey) |
ProtectKeysWithCertificate | ProtectKeysWithCertificate(p1,p2) | static IDataProtectionBuilder ProtectKeysWithCertificate(IDataProtectionBuilder builder, X509Certificate2 certificate)static IDataProtectionBuilder ProtectKeysWithCertificate(IDataProtectionBuilder builder, string thumbprint) |
ProtectKeysWithDpapi | ProtectKeysWithDpapi(value)ProtectKeysWithDpapi([ :builder = … ])ProtectKeysWithDpapi([ :builder = …, :protectToLocalMachine = … ]) | static IDataProtectionBuilder ProtectKeysWithDpapi(IDataProtectionBuilder builder)static IDataProtectionBuilder ProtectKeysWithDpapi(IDataProtectionBuilder builder, bool protectToLocalMachine) |
ProtectKeysWithDpapiNG | ProtectKeysWithDpapiNG(value)ProtectKeysWithDpapiNG([ :builder = … ])ProtectKeysWithDpapiNG([ :builder = …, :protectionDescriptorRule = …, :flags = … ]) | static IDataProtectionBuilder ProtectKeysWithDpapiNG(IDataProtectionBuilder builder)static IDataProtectionBuilder ProtectKeysWithDpapiNG(IDataProtectionBuilder builder, string protectionDescriptorRule, DpapiNGProtectionDescriptorFlags flags) |
SetApplicationName | SetApplicationName(p1,p2) | static IDataProtectionBuilder SetApplicationName(IDataProtectionBuilder builder, string applicationName) |
SetDefaultKeyLifetime | SetDefaultKeyLifetime(p1,p2) | static IDataProtectionBuilder SetDefaultKeyLifetime(IDataProtectionBuilder builder, TimeSpan lifetime) |
UnprotectKeysWithAnyCertificate | UnprotectKeysWithAnyCertificate(p1,p2) | static IDataProtectionBuilder UnprotectKeysWithAnyCertificate(IDataProtectionBuilder builder, X509Certificate2[] certificates) |
UseCryptographicAlgorithms | UseCryptographicAlgorithms(p1,p2) | static IDataProtectionBuilder UseCryptographicAlgorithms(IDataProtectionBuilder builder, AuthenticatedEncryptorConfiguration configuration) |
UseCustomCryptographicAlgorithms | UseCustomCryptographicAlgorithms(p1,p2) | static IDataProtectionBuilder UseCustomCryptographicAlgorithms(IDataProtectionBuilder builder, CngCbcAuthenticatedEncryptorConfiguration configuration)static IDataProtectionBuilder UseCustomCryptographicAlgorithms(IDataProtectionBuilder builder, CngGcmAuthenticatedEncryptorConfiguration configuration)static IDataProtectionBuilder UseCustomCryptographicAlgorithms(IDataProtectionBuilder builder, ManagedAuthenticatedEncryptorConfiguration configuration) |
UseEphemeralDataProtectionProvider | UseEphemeralDataProtectionProvider(p1) | static IDataProtectionBuilder UseEphemeralDataProtectionProvider(IDataProtectionBuilder builder) |
DataProtectionCommonExtensions class static
Microsoft.AspNetCore.DataProtection.DataProtectionCommonExtensions · assembly Microsoft.AspNetCore.DataProtection.Abstractions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
CreateProtector | CreateProtector([ :provider = …, :purposes = … ])CreateProtector([ :provider = …, :purpose = …, :subPurposes = … ]) | static IDataProtector CreateProtector(IDataProtectionProvider provider, IEnumerable<string> purposes)static IDataProtector CreateProtector(IDataProtectionProvider provider, string purpose, string[] subPurposes) |
GetDataProtectionProvider | GetDataProtectionProvider(p1) | static IDataProtectionProvider GetDataProtectionProvider(IServiceProvider services) |
GetDataProtector | GetDataProtector([ :services = …, :purposes = … ])GetDataProtector([ :services = …, :purpose = …, :subPurposes = … ]) | static IDataProtector GetDataProtector(IServiceProvider services, IEnumerable<string> purposes)static IDataProtector GetDataProtector(IServiceProvider services, string purpose, string[] subPurposes) |
Protect | Protect(p1,p2) | static string Protect(IDataProtector protector, string plaintext) |
Unprotect | Unprotect(p1,p2) | static string Unprotect(IDataProtector protector, string protectedData) |
DataProtectionOptions class
Microsoft.AspNetCore.DataProtection.DataProtectionOptions · assembly Microsoft.AspNetCore.DataProtection
Constructors
new DataProtectionOptions() |
Ring: new DataProtectionOptions(args) uses one constructor; the others are chosen by the parameter names: new DataProtectionOptions().@New([ :param = value ]) or dnNew("DataProtectionOptions",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
ApplicationDiscriminator | string | read, write | o.ApplicationDiscriminator o.ApplicationDiscriminator = v |
DataProtectionProvider class static
Microsoft.AspNetCore.DataProtection.DataProtectionProvider · assembly Microsoft.AspNetCore.DataProtection.Extensions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Create | Create(value)Create([ :applicationName = … ])Create([ :keyDirectory = … ])Create([ :keyDirectory = …, :setupAction = … ])Create([ :applicationName = …, :certificate = … ]) | static IDataProtectionProvider Create(string applicationName)static IDataProtectionProvider Create(DirectoryInfo keyDirectory)static IDataProtectionProvider Create(DirectoryInfo keyDirectory, Action<IDataProtectionBuilder> setupAction)static IDataProtectionProvider Create(string applicationName, X509Certificate2 certificate)static IDataProtectionProvider Create(DirectoryInfo keyDirectory, X509Certificate2 certificate)static IDataProtectionProvider Create(DirectoryInfo keyDirectory, Action<IDataProtectionBuilder> setupAction, X509Certificate2 certificate) |
DataProtectionUtilityExtensions class static
Microsoft.AspNetCore.DataProtection.DataProtectionUtilityExtensions · assembly Microsoft.AspNetCore.DataProtection
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
GetApplicationUniqueIdentifier | GetApplicationUniqueIdentifier(p1) | static string GetApplicationUniqueIdentifier(IServiceProvider services) |
EphemeralDataProtectionProvider class sealed
Microsoft.AspNetCore.DataProtection.EphemeralDataProtectionProvider · assembly Microsoft.AspNetCore.DataProtection
Constructors
new EphemeralDataProtectionProvider() |
new EphemeralDataProtectionProvider(ILoggerFactory loggerFactory) |
Ring: new EphemeralDataProtectionProvider(args) uses one constructor; the others are chosen by the parameter names: new EphemeralDataProtectionProvider().@New([ :param = value ]) or dnNew("EphemeralDataProtectionProvider",[ :param = value ]).
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
CreateProtector | callMethod("CreateProtector",[p1]) | IDataProtector CreateProtector(string purpose) |
IDataProtectionBuilder interface
Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder · assembly Microsoft.AspNetCore.DataProtection
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Services | IServiceCollection | read | o.Services |
IDataProtectionProvider interface
Microsoft.AspNetCore.DataProtection.IDataProtectionProvider · assembly Microsoft.AspNetCore.DataProtection.Abstractions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
CreateProtector | callMethod("CreateProtector",[p1]) | IDataProtector CreateProtector(string purpose) |
IDataProtector interface
Microsoft.AspNetCore.DataProtection.IDataProtector · assembly Microsoft.AspNetCore.DataProtection.Abstractions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Protect | callMethod("Protect",[p1]) | byte[] Protect(byte[] plaintext) |
Unprotect | callMethod("Unprotect",[p1]) | byte[] Unprotect(byte[] protectedData) |
IPersistedDataProtector interface
Microsoft.AspNetCore.DataProtection.IPersistedDataProtector · assembly Microsoft.AspNetCore.DataProtection
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
DangerousUnprotect | DangerousUnprotect(p1,p2) | byte[] DangerousUnprotect(byte[] protectedData, bool ignoreRevocationErrors, out bool requiresMigration, out bool wasRevoked) |
ISecret interface
Microsoft.AspNetCore.DataProtection.ISecret · assembly Microsoft.AspNetCore.DataProtection
Implements: IDisposable
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Length | int | read | o.Length |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
WriteSecretIntoBuffer | WriteSecretIntoBuffer(p1) | void WriteSecretIntoBuffer(ArraySegment<byte> buffer) |
ITimeLimitedDataProtector interface
Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector · assembly Microsoft.AspNetCore.DataProtection.Extensions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
CreateProtector | callMethod("CreateProtector",[p1]) | ITimeLimitedDataProtector CreateProtector(string purpose) |
Protect | Protect([ :plaintext = …, :expiration = … ]) | byte[] Protect(byte[] plaintext, DateTimeOffset expiration) |
Unprotect | Unprotect(p1) | byte[] Unprotect(byte[] protectedData, out DateTimeOffset expiration) |
Secret class sealed
Microsoft.AspNetCore.DataProtection.Secret · assembly Microsoft.AspNetCore.DataProtection
Implements: IDisposable
Constructors
new Secret(ArraySegment<byte> value) |
new Secret(byte[] value) |
new Secret(Byte* secret, int secretLength) |
new Secret(ISecret secret) |
Ring: new Secret(args) uses one constructor; the others are chosen by the parameter names: new Secret().@New([ :param = value ]) or dnNew("Secret",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Length | int | read | o.Length |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Dispose | callMethod("Dispose",[]) | void Dispose() |
Random | Random(p1) | static Secret Random(int numBytes) |
WriteSecretIntoBuffer | WriteSecretIntoBuffer(p1) | void WriteSecretIntoBuffer(ArraySegment<byte> buffer)void WriteSecretIntoBuffer(Byte* buffer, int bufferLength) |