public static void PublicKey_TryExportSubjectPublicKeyInfo_TooSmall()
 {
     using (ECDiffieHellman ecdh = ECDiffieHellmanFactory.Create())
         using (ECDiffieHellmanPublicKey publicKey = ecdh.PublicKey)
         {
             Span <byte> destination = stackalloc byte[1];
             Assert.False(publicKey.TryExportSubjectPublicKeyInfo(destination, out int written));
             Assert.Equal(0, written);
         }
 }
Exemple #2
0
 public override bool TryExportSubjectPublicKeyInfo(Span <byte> destination, out int bytesWritten) =>
 _wrapped.TryExportSubjectPublicKeyInfo(destination, out bytesWritten);