Discuss this help topic in SecureBlackbox Forum
EDI: Decrypt an AS2/AS3 message
If encrypted messages are expected, they can be processed the following ways:
Examples:
C#:
// create an AS2 message
TElAS2Message message = new TElAS2Message();
// load all your certificates with private keys
TElMemoryCertStorage myCertificates = new TElMemoryCertStorage;
myCertificates.LoadFromStreamPFX(...);
// and assign the storage to Encryption.CertStorage
message.Encryption.CertStorage = myCertificates;
// load a message; if the message is encrypted, the appropriate
// certificate will be used automatically
message.Load(messageStream, dataStream);
// then you can check if the message was encrypted or not
if (message.Encryption.Enabled)
Console.WriteLine(“Encryption algorithm: {0}”, message.Encryption.Algorithm);