Assume that I have a confidential package that nobody is allowed to see the source code. The users are only allowed to use the public macros. This question is closely related to my other question.
\documentclass{article}
\usepackage{mypackage}% it is allowed.
\usepackage{listings}
\begin{document}
\publicmacro% it is allowed.
\lstinputlisting{mypackage.sty}% it is not allowed.
\end{document}
Is it possible to prevent users from seeing the package codes while they still can make use of its publicly exposed macros?

texmftree at all, and after some tweaking of\showand\tracing...you should be able to hide the code completely. – tohecz Aug 31 '12 at 9:10