Created
March 8, 2017 18:39
-
-
Save inxilpro/3491da8a8d90e33f36a51931e867df36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $key = '[[ KEY ]]'; | |
| $userData = [ | |
| 'avatarURL' => $user->avatarURL, | |
| 'email' => $user->email, | |
| 'id' => $user->id, | |
| 'name' => $user->name | |
| ]); | |
| $token = bin2hex(openssl_encrypt(json_encode($data), 'AES-128-ECB', md5($key, true), OPENSSL_RAW_DATA)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment