Edit

Share via


CompositeMLDsa.TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) Method

Definition

Attempts to export the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format into the provided buffer.

public:
 bool TryExportSubjectPublicKeyInfo(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten);
member this.TryExportSubjectPublicKeyInfo : Span<byte> * int -> bool
Public Function TryExportSubjectPublicKeyInfo (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

Parameters

destination
Span<Byte>

The buffer to receive the X.509 SubjectPublicKeyInfo value.

bytesWritten
Int32

When this method returns, contains the number of bytes written to the destination buffer.

This parameter is treated as uninitialized.

Returns

true if destination was large enough to hold the result; otherwise, false.

Exceptions

This instance has been disposed.

An error occurred while exporting the key.

Applies to