If i understand correctly your answer, it is not possible to include an external js file in an xml file (encrypted or not). You have to copy/paste the code in a CDATA section?
This is cumbersome when using and IDE to code and debug the js code.
It would nice to be able to use <include> to include an external js file. If it is possible, I believe it would be a useful feature for a future update of krpano.
With this feature, we could keep js and xml code separated while still being able to encrypt xml and js files.