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

How to change the encryption key, method, algorithm, etc.. #22

Open
m-primo opened this issue Jun 20, 2022 · 4 comments
Open

How to change the encryption key, method, algorithm, etc.. #22

m-primo opened this issue Jun 20, 2022 · 4 comments

Comments

@m-primo
Copy link

m-primo commented Jun 20, 2022

How to change method, key, and edit the algorithm.
I think I need to publish the package and do custom edit myself, but there are no publish resources for this package.
Any thoughts?

@charliefortune
Copy link

@m-primo Did you find any solution to this? I'm looking for the same - specifically to set my own encryption key.

@m-primo
Copy link
Author

m-primo commented Mar 7, 2024

@m-primo Did you find any solution to this? I'm looking for the same - specifically to set my own encryption key.

No, I didn't, but according to this package's code, it uses APP_KEY environment variable to set the encryption key, you can edit but, but I don't really think it's a good idea to change the APP_KEY for it, neither it's a good idea to use the APP_KEY as the encryption key! That's why I was asking if there's a way to publish it, like the config at least.
This is the config file: /src/Config/config.php.

I noticed a user mentioning ( #13 #13 (comment) ) that we can copy the config.php file into another file and change the keys, but I haven't tried it, and I don't know which file name should it be, maybe as is config.php? I don't really know.

@charliefortune
Copy link

I noticed a user mentioning ( #13 #13 (comment) ) that we can copy the config.php file into another file and change the keys, but I haven't tried it, and I don't know which file name should it be, maybe as is config.php? I don't really know.

That's useful thanks, seems like it could work. I would give it a different name (e.g. encryption.php) and save it in the config dir, I assume it gets autoloaded in there. I'll give it a try and update here if it works.

I agree that sharing/changing the APP_KEY is a bad idea. It's not even an option for me in my project, really.

@m-primo
Copy link
Author

m-primo commented Mar 12, 2024

I would give it a different name (e.g. encryption.php) and save it in the config dir, I assume it gets autoloaded in there. I'll give it a try and update here if it works.

Cool, let me know if it worked.

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

2 participants