I was trying to rewrite a python registration page of a game server to PHP, before inserting the password to database it is encrypted with the following function
hash = binascii.b2a_hex(self.cipher.encrypt(binascii.a2b_hex(hash)))
I'm not familiar with encryption and have no clue how to translate this to PHP