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 的字节数。

返回

true 如果 destination 具有足够的长度来接收值,则为 ;否则为 false

例外

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

-或-

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

注解

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

适用于