This function encrypts data using the OpenSSL library. This is useful for protecting sensitive information such as passwords or personal data by converting it into an unreadable form.