Page 1 of 1

Mrypt Functions not working...

PostPosted: 09. March 2017 14:13
by PhoenixWeb
I am developing a fully integrated backend for small hospitality businesses.

Long story short they use outlook for phone contact synchronization.

I am attempting to oauth2 to get a key to make API calls with Microsoft Graph.

The problem is... I keep getting this error...

Call to undefined function RandomLib\mycrypt_enc_get_iv_size()

And when I check the server mcrypt is enabled.... Terribly confused...

Re: Mrypt Functions not working...

PostPosted: 09. March 2017 17:41
by Nobbie
>RandomLib\mycrypt_enc_get_iv_size()

That looks very strange, what is this "RandomLib\" in front of the function call?? Please show us the corresponding PHP Code.

Re: Mrypt Functions not working...

PostPosted: 09. March 2017 18:40
by PhoenixWeb
public function __construct()
{
$this->mcrypt = mcrypt_module_open($this->getCipher(), '', MCRYPT_MODE_ECB, '');
$this->blockSize = mcrypt_enc_get_block_size($this->mcrypt);
$this->initv = str_repeat(chr(0), mycrypt_enc_get_iv_size($this->mcrypt));
}

Re: Mrypt Functions not working...

PostPosted: 09. March 2017 19:23
by Nobbie
Seems to be something wrong with that code, I dont know what you are doing there, but obviously you render the wrong function name. Is this *really* the corresponding line of code?? (I dont think so, but it is your code).

Re: Mrypt Functions not working...

PostPosted: 10. March 2017 02:47
by PhoenixWeb
This code is from the normal Microsoft Graph Connect Sample.

It isn't some random code I am trying out of the blue... thousands of people have used it to connect.
It is to generate a token with Oauth2. Once authorized, the token allows you to explore the API via normal Live\Outlook credentials.