Encrypt API key

One of my plugins is using an API key to communicate with an off-page service. However, this API is not encrypted and is therefore visible to everyone with an admin login.

Can I encrypt the API key in the database? And what would be the best practice for doing this?

Thanks,

Topic encryption api Wordpress

Category Web


There is no point in doing that. Anyone that has access to the DB and the code will be able to decrypt, and the admin is likely to have this kind of access.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.