TheAlphaSchoolSystemPTYLTD / api-introduction

A basic introduction to the TASS API's.
16 stars 10 forks source link

Encrypt function is deprecated in PHP 7.1 #7

Closed guygunarathne closed 5 years ago

guygunarathne commented 5 years ago

Hi,

I am using Encrypt function from https://github.com/TheAlphaSchoolSystemPTYLTD/api-introduction/blob/master/encryptDecrypt.php for TASS to Get encrypted token. It didn't worked with PHP 7.1 in CakePhp 3.3.4, it gives an Error 'Function is deprecated'. But its same working with PHP 7.

Screenshot:- https://prnt.sc/mq654y

I had also researched this issue and also tried 'Openssl and other alternative methods for mcrypt' they didn't returns same token as required for TASS and didn't worked. Please check and provide me if there is any alternative Encrypt method that support PHP 7.1 or higher versions of PHP to get TASS ('getStudentDetails','getCommunicationRulesDetails').

Thanks!

jtc commented 5 years ago

Hi @guygunarathne,

If you refer to the commit referenced above, I've updated the PHP code to use OpenSSL instead of Mcrypt.

I've tested about 20 different Token Key and Parameter combinations, and these OpenSSL functions produce the same output as the Mcrypt functions.

Josh (not a TASS employee)