Encrypt API key [duplicate]

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.