Skip to content

Commit

Permalink
Use span instead of array in PublicKey
Browse files Browse the repository at this point in the history
  • Loading branch information
vcsjones authored May 19, 2022
1 parent 55090e6 commit d8fe9cd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ private static unsafe int DecodeSubjectPublicKeyInfo(
}

oid = new Oid(spki.Algorithm.Algorithm, null);
parameters = new AsnEncodedData(spki.Algorithm.Parameters?.ToArray() ?? Array.Empty<byte>());
keyValue = new AsnEncodedData(spki.SubjectPublicKey.ToArray());
parameters = new AsnEncodedData(spki.Algorithm.Parameters.GetValueOrDefault().Span);
keyValue = new AsnEncodedData(spki.SubjectPublicKey.Span);
return read;
}
}
Expand Down

0 comments on commit d8fe9cd

Please sign in to comment.