Table of Contents

Method SignData

Namespace
DocWright.Signatures
Assembly
DocWright.Signatures.dll

SignData(byte[], SignatureHashAlgorithm)

Signs data with the private key belonging to the certificate returned by GetCertificate().

byte[] SignData(byte[] data, SignatureHashAlgorithm hashAlgorithm)

Parameters

data byte[]

The exact octets to sign — for an XML signature, the canonicalized SignedInfo element. The provider hashes and signs; DocWright does not pre-hash, because a device that wants to do both itself must be free to.

hashAlgorithm SignatureHashAlgorithm

The hash algorithm to sign under.

Returns

byte[]

The raw signature value, as PKCS#1 v1.5 for an RSA key.