语言

CoseMultiSignMessage.TryEncode(Span<Byte>, Int32) 方法

定义

尝试将此消息编码到指定的缓冲区。

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

参数

destination
Span<Byte>

要在其中写入编码值的缓冲区。

bytesWritten
Int32

成功后,接收写入到 destination的字节数。

返回

如果 有足够的长度来接收值,则为 。

例外

集合ProtectedHeadersUnprotectedHeaders具有一个或多个共同标签。

-或-

消息不包含至少一个签名。

注解

用于 GetEncodedLength() 确定对此消息进行编码的字节数。

适用于

另请参阅