Discuss this help topic in SecureBlackbox Forum

EDI: Compose encrypted AS2/AS3 messages

To create an encrypted message, the following steps have to be performed before saving the composed message:

  1. Set Encryption.Enabled property to true;
  2. assign a certificate storage with recipient's certificates to Encryption.CertStorage property;
  3. setup optional encryption-related properties



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

// set other properties

// enable message encryption
message.Encryption.Enabled = true;

// assign a certificate storage (no private keys needed)
message.Encryption.CertStorage = encryptionStorage;

// set encryption algorithm
message.Encryption.Algorithm = SBConstants.__Global.SB_ALGORITHM_CNT_AES256;

// 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