CompositeMLDsa.SignData 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
簽署指定的資料。
多載
| 名稱 | Description |
|---|---|
| SignData(ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>) |
對指定資料進行簽名,並將簽名寫入所提供的緩衝區。 |
| SignData(Byte[], Byte[]) |
簽署指定的資料。 |
SignData(ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>)
對指定資料進行簽名,並將簽名寫入所提供的緩衝區。
public int SignData(ReadOnlySpan<byte> data, Span<byte> destination, ReadOnlySpan<byte> context = default);
member this.SignData : ReadOnlySpan<byte> * Span<byte> * ReadOnlySpan<byte> -> int
Public Function SignData (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), Optional context As ReadOnlySpan(Of Byte) = Nothing) As Integer
參數
- data
- ReadOnlySpan<Byte>
要簽署的數據。
接收簽名的緩衝區。 其長度必須至少 MaxSignatureSizeInBytes為 。
傳回
寫入 destination 緩衝區的位元組數。
例外狀況
destination 長度小於 MaxSignatureSizeInBytes 。
context 擁有 Length 超過 255 位元組的空間。
這個實例已經被處理掉了。
適用於
SignData(Byte[], Byte[])
簽署指定的資料。
public byte[] SignData(byte[] data, byte[]? context = default);
member this.SignData : byte[] * byte[] -> byte[]
Public Function SignData (data As Byte(), Optional context As Byte() = Nothing) As Byte()
參數
- data
- Byte[]
要簽署的數據。
傳回
Byte[]
Composite ML-DSA 指定資料的簽名。
例外狀況
data 是 null。
context 長度超過 255 位元組。
這個實例已經被處理掉了。
備註
情 null 境被視為空的。