private static Pkcs8Response ImportPkcs8( ReadOnlySpan <byte> keyBlob, ReadOnlySpan <char> password) { CngKey key = CngKey.ImportEncryptedPkcs8(keyBlob, password); key.ExportPolicy = CngExportPolicies.AllowExport | CngExportPolicies.AllowPlaintextExport; return(new Pkcs8Response { Key = key, }); }