Yes, it is possible to create signatures on .NET CF.
The code looks like this:
// load certificate with private key
var cert = Certificate.LoadPfx(certPath, certPassword);
// set desired parameters
var parameters = new SignatureParameters()
{
HashAlgorithm = HashingAlgorithmId.SHA256,
Format = SignatureFormat.Pkcs,
};
// compute signature
byte[] signedData = cert.SignMessage(dataToSign, parameters);
// convert binary data to base-64 string
string signature = Convert.ToBase64String(signedData);
However, you are responsible to provide dataToSign
for the SignMessage
method.
What I know about XML signatures, there is typically specified: normalization for XML, signature format, hash method, etc.