I am developing a WordPress plugin which will provide end-users access to a specific, third-party API.
There are two types of credentials used to authenticate with the API: End user (email and password) and service provider, aka me (partner ID and signature key). These credentials are used along with other parameters (such as a timestamp) to calculate a "partner signature" which is ultimately used for authentication.
This way the API knows who accessed their service from which partner. Sadly it doesn't support any other type of auth.
The problem is that these passwords need to be in their original format (no hash or encryption) for the partner signature "calculation". However, if I do not encrypt or hash them, people could just take my credentials and make their own API or doing other sorts of shady business with my partner credentials.
TL;DR: I need to encrypt/decrypt passwords inside a WordPress plugin so that only the plugin has access to the original password.