DSA.TrySignData Metoda

Definicja

Przeciążenia

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

Próbuje utworzyć sygnaturę DSA dla określonych danych w podanym buforze.

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

Próbuje utworzyć podpis DSA dla określonych danych w wskazanym formacie i umieścić go w podanym buforze.

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

Źródło:
DSA.cs
Źródło:
DSA.cs
Źródło:
DSA.cs

Próbuje utworzyć sygnaturę DSA dla określonych danych w podanym buforze.

public:
 virtual bool TrySignData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TrySignData (ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten);
abstract member TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
override this.TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
Public Overridable Function TrySignData (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, ByRef bytesWritten As Integer) As Boolean

Parametry

data
ReadOnlySpan<Byte>

Dane do utworzenia skrótu i podpisania.

destination
Span<Byte>

Zakres bajtów do odbierania podpisu.

hashAlgorithm
HashAlgorithmName

Nazwa algorytmu skrótu do użycia.

bytesWritten
Int32

Gdy ta metoda zwraca wartość, zawiera wartość, która wskazuje liczbę bajtów zapisanych w destinationobiekcie .

Zwraca

truejeśli destination jest wystarczająco duży, aby otrzymać wynik; w przeciwnym razie . false

Dotyczy

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

Źródło:
DSA.cs
Źródło:
DSA.cs
Źródło:
DSA.cs

Próbuje utworzyć podpis DSA dla określonych danych w wskazanym formacie i umieścić go w podanym buforze.

public:
 bool TrySignData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TrySignData (ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten);
member this.TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat * int -> bool
Public Function TrySignData (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat, ByRef bytesWritten As Integer) As Boolean

Parametry

data
ReadOnlySpan<Byte>

Dane do utworzenia skrótu i podpisania.

destination
Span<Byte>

Bufor do odbierania podpisu.

hashAlgorithm
HashAlgorithmName

Algorytm skrótu używany do tworzenia wartości skrótu.

signatureFormat
DSASignatureFormat

Format kodowania do użycia dla podpisu.

bytesWritten
Int32

Gdy ta metoda zwraca wartość, zawiera wartość, która wskazuje liczbę bajtów zapisanych w destinationobiekcie . Ten parametr jest traktowany jako niezainicjowany.

Zwraca

truejeśli destination jest wystarczająco duży, aby otrzymać podpis; w przeciwnym razie . false

Wyjątki

signatureFormat nie jest znanym formatem.

hashAlgorithm ma wartość lub jest pusta nullName.

Wystąpił błąd podczas operacji podpisywania.

Dotyczy