Eigenverft.WebLib.Infrastructure
  • Guides
  • API
Show / Hide Table of Contents
  • Eigenverft.WebLib.Infrastructure.Hosting.Configuration.Values
    • AspNetDataProtectionConfigurationValueCodecs
  • Eigenverft.WebLib.Infrastructure.Hosting.DirectoryLayout
    • WebApplicationBuilderFactory
  • Eigenverft.WebLib.Infrastructure.Hosting.Kestrel
    • ConfigureWebHostBuilderExtensions
  • Eigenverft.WebLib.Infrastructure.Transformations
    • AspNetDataProtectionStringTransforms

Class AspNetDataProtectionStringTransforms

Creates reversible string transforms backed by ASP.NET Core Data Protection.

Inheritance
object
AspNetDataProtectionStringTransforms
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Eigenverft.WebLib.Infrastructure.Transformations
Assembly: Eigenverft.WebLib.Infrastructure.dll
Syntax
public static class AspNetDataProtectionStringTransforms
Remarks

Use AspNetDataProtectionConfigurationValueCodecs when a persisted ConfigurationValueCodec is required.

Methods

| Edit this page View Source

DataProtection(string, string, string)

Creates an ASP.NET Core Data Protection transform with explicit application and purpose isolation.

Declaration
public static ReversibleStringTransform DataProtection(string keyDirectoryPath, string applicationName, string purpose)
Parameters
Type Name Description
string keyDirectoryPath

The persistent Data Protection key-ring directory.

string applicationName

The stable logical application discriminator.

string purpose

The stable purpose isolating this protected data from other Data Protection uses.

Returns
Type Description
ReversibleStringTransform

A transform backed by the specified persistent Data Protection key ring.

Remarks

The key ring is durable state. Back up the complete ring with protected values and retain old keys while data may still depend on them. Losing keys can make existing transformed values permanently unavailable.

Keep applicationName and purpose stable for as long as values must remain reversible. Changing either makes values unavailable to the new protector. Data Protection alone adds no machine binding; moving the same key ring and isolation context to another machine is sufficient unless another transform adds a machine-context requirement.

Directory separation is not an ACL boundary and this helper does not configure an additional at-rest encryptor for the key-ring files. A missing directory is created; on an existing installation an unexpectedly new or empty ring should therefore be treated as lost state, not as successful migration.

  • Edit this page
  • View Source
In this article
Back to top