Discuss this help topic in SecureBlackbox Forum

EDI: Compose signed AS2/AS3 messages

To create a signed message, the following steps have to be performed before saving the composed message:

  1. set Signature.Enabled property to true;
  2. assign a certificate storage (which must contain at least one certificate with a private key available) to Signature.CertStorage property
  3. setup optional signature-related properties



// create an AS2 message
TElAS2Message message = new TElAS2Message();

// set other properties

// enable the signature
message.Signature.Enabled = true;

// assign signing certificate(s)
message.Signature.CertStorage = signingStorage;

// choose the digest algorithm to be used to calculate data hash
message.Signature.DigestAlgorithm = TSBASSignatureDigestAlgorithm.sdaSHA256;

// set when the message was signed
message.Signature.Time = DateTime.UtcNow;

// load EDI data from the file and save
// the AS2 message to another file
message.Save("mydata.edi", "mymsg.as2m");

How To articles about AS2 and AS3 messages

Discuss this help topic in SecureBlackbox Forum