Are you sure that the mhash type MHASH_SHA256 exists? Instead of just commenting out THROW ERROR, make a return( null ); Enjoy, John
On Jan 11, 5:40 am, David Brisebois <[email protected]> wrote: > Hi there ! > > I am "baking" up a new website which will use the Windows Live ID Web > Authentification service in order to access the web site. Based on the > PHP file provided in the SDK, I made my own component which works > fairly well (it still need some optimization). > > The only weird thing is that calling the function that derives the > secret key to use the service make the Controller dump disappear. I > tries everything, from changing function names, doing the logic in > startup or with a direct call... and so on. But I found that the > problem is when I try to save the deriviated key to an attribute... To > help you understand here are the two method as they are now : > > function set_key() > { > $this->derive( 'SIGNATURE' ); > $this->crypt_key = $this->derive( 'ENCRYPTION' ); > } > > function derive( $prefix = null ) > { > if ( is_null( $prefix ) ) { > //THROW ERROR > } > > $length = 16; > $key = $prefix . $this->app_key; > $key = mhash( MHASH_SHA256, $key ); > if ( !$key || ( strlen($key) < $length ) ) > { > //THROW ERROR > } > > return substr($key, 0, $length); > } > > If you use the code as shown above, the dump is hiden, if you comment > out the second call to derive() in the set_key() function, it is > not... but I really need them to be stored in an attribute ! > > Any idea on what happens ? > > Thanks.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
