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
databyte[]The exact octets to sign — for an XML signature, the canonicalized
SignedInfoelement. The provider hashes and signs; DocWright does not pre-hash, because a device that wants to do both itself must be free to.hashAlgorithmSignatureHashAlgorithmThe hash algorithm to sign under.
Returns
- byte[]
The raw signature value, as PKCS#1 v1.5 for an RSA key.