Use stackalloc in RSAPkcs1X509SignatureGenerator.BuildPublicKey (#46893)
authorStephen Toub <stoub@microsoft.com>
Wed, 13 Jan 2021 14:48:00 +0000 (09:48 -0500)
committerGitHub <noreply@github.com>
Wed, 13 Jan 2021 14:48:00 +0000 (09:48 -0500)
commit01ee94b1ec76089eccea5097692d6f1d30997c60
tree3006b9bf8018c3444c8c4997078b12859df54d47
parentf577784a065f83cd69cbaa88878a417ed1f9759f
Use stackalloc in RSAPkcs1X509SignatureGenerator.BuildPublicKey (#46893)

Just an unnecessary allocation.  The AsnEncodedData ctor makes a copy regardless of whether the input is a span or an array, so may as well avoid allocating another array on top of that.
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/RSAPkcs1X509SignatureGenerator.cs