the method of encrypt the developed plug-in to protect the source code

Dear All

I want to encrypt the developed plug-in to protect the source code. Because plugins in the. plugin format do not support encryption, two alternative encryption schemes have been proposed. First, the plug-in that generates. exe is encrypted; second, the dll is encrypted first, and then the plug-in is generated by referencing an external dll. Therefore, I would like to ask two questions. One is the method of generating. exe format or how to generate plug-ins by referencing external dlls after encrypting dlls.

  who can give me some suggestiong,Tks.

Best regards!