Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function and Property names encryption #22

Closed
kodeine opened this issue May 27, 2015 · 6 comments
Closed

Function and Property names encryption #22

kodeine opened this issue May 27, 2015 · 6 comments

Comments

@kodeine
Copy link

kodeine commented May 27, 2015

Hello,
Is there a way to encrypt function names and property names?
Thank you for hard work on this library.

for example this is the output for your review.

    public function setTimeout(int $spb436b4)
    {
        $this->config->timeout = $spb436b4;
    }
@Mike-Benoit
Copy link

Yes, that would be a really nice feature. Encrypting strings would be wonderful too!

@naneau
Copy link
Owner

naneau commented Nov 27, 2015

This library was originally written so that all external (public, protected) API would not be changed. That way you can distribute your code as a library, but have its code be hard to read/modify.

Obfuscation of public methods won't work, because you'd have to find all places where they are called and replace them as well. This means that the scanning would have to expand to all methods calls. I can look into it, but it'll likely be more error-prone than internal (private) encryption.

@kodeine
Copy link
Author

kodeine commented Nov 27, 2015

I think we can define project path and then it can find replace all methods and strings. Encrypting strings would make this package really unique and intuitive.

@Mike-Benoit
Copy link

In our case we only want to obfuscate a single class file, which has about 2-3 public functions and the rest are all for "internal" use only. So we would like to obfuscate all but those public functions just within the class itself.

Several of the strings (ie: private $myvar = "secretkey"; ) would be nice to obfuscate too just for added protection.

@gburtini
Copy link
Contributor

See the last few comments of #28 for my start on a solution to this.

@naneau
Copy link
Owner

naneau commented Jan 13, 2017

Closing for #28

@naneau naneau closed this as completed Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants