Create My Own EDIINT processMSG with AS/2

I want create my own receiver service for EDIINT documents. This is because I can’t leave the resubmit on because of the document that are coming in on the AS2. Some are flat files, some are EDI and others. I want to be able to handle it myself. The issue I have is when I get the ContentParts and get the Bytes element out its still the encrypted AS2 data. How do I decrypt it?

Thanks.