[API Proposal]: Amend MLKem, MLDsa, and SlhDsa ImportEncryptedPkcs8PrivateKey #115024
Labels
api-ready-for-review
API is ready for review, it is NOT ready for implementation
area-System.Security
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Background and motivation
In #114453 we approved the following APIs for
ImportEncryptedPkcs8PrivateKey
:After some discussion, we decided that the last of the trio would be better if the
source
parameter were abyte[]
, not aReadOnlySpan<byte>
.We decided that, since the string overloads for password exist purely for ease-of-use for other downlevel platforms, that one should take a byte array instead of a ReadOnlySpan. There is already an overload that accepts ReadOnlySpan, ReadOnlySpan, so modern targets still have access to all the span APIs that they want.
This also offers better symmetry with
ImportFromEncryptedPem
which usesstring, byte[]
.API Proposal
API Usage
Same usage, but a different type for platforms where span is cumbersome to use.
Alternative Designs
No response
Risks
No response
The text was updated successfully, but these errors were encountered: