-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
Currently, the PemEncoding and PemFields types live in System.Security.Cryptography.Encoding. This made sense at the time. However, it makes it difficult to use the PEM functionality from things in System.Security.Cryptography.Primitives, specifically AsymmetricAlgorithm, because that would be a circular dependency.
This has already impacted our ability to do something we wanted to at #34086 (comment).
With #51630, we’re going to run in to this again, with a stronger argument that the PEM-PKCS8 exports should be done on AsymmetricAlgorithm directly. This leaves us with two options:
- Move the types we need in to the
Primitivesassembly. - Use reflection to call the PEM APIs.
This is doable, but we will need to call the allocating APIs since working withSpan<T>with reflection is not doable today.