Method SignHash
SignHash(SoftwareIdentityKind, Nullable<String>, Byte[], Byte[], out Byte[])
Signs a SHA-256 hash with the identity's key: RSA PKCS#1 v1.5 (DigestInfo SHA-256) - the identity Chain(SoftwareIdentityKind, Nullable<String>, Byte[], out Nullable<X509Certificate2Collection>) returns for the same arguments, created on first use.
Declaration
public static Error SignHash(SoftwareIdentityKind kind, string? phoneId, byte[] subjectName, byte[] sha256, out byte[] signature)
Parameters
| Type | Name | Description |
|---|---|---|
| SoftwareIdentityKind | kind | |
| System.Nullable<System.String> | phoneId | |
| System.Byte[] | subjectName | |
| System.Byte[] | sha256 | The 32 octets of the hash, e.g. of a CMS's signed attributes. |
| System.Byte[] | signature | The signature value. Null in case of error. |
Returns
| Type | Description |
|---|---|
| Error | As Chain(SoftwareIdentityKind, Nullable<String>, Byte[], out Nullable<X509Certificate2Collection>); GENERAL_FAILURE also for a hash that isn't 32 octets. |