Re: [Daloradius-users] Any Javascript approach for this PHP function
RADIUS web management application
Brought to you by:
lirantal
From: Liran T. <lir...@gm...> - 2017-01-13 16:59:22
|
Yes you just need to translate that to JavaScript using binary data notation. In Node.js you can use the Buffer object, or in the browser maybe parseInt() with base 2 can help. On Fri, Jan 13, 2017 at 6:43 PM, Nkansah Rexford <sea...@gm...> wrote: > This function is available in DaloRADIUS > > https://github.com/lirantal/daloradius/blob/master/contrib/chilli/portal- > bluechipwireless/hotspotlogin/hotspotlogin.php#L159 > > $hexchal = pack ("H32", $challenge); > if ($uamsecret) { > $newchal = pack ("H*", md5($hexchal . $uamsecret)); > } else { > $newchal = $hexchal; > } > > $response = md5("\0" . $password . $newchal); > $newpwd = pack("a32", $password); > $pappassword = implode ("", unpack("H32", ($newpwd ^ $newchal))); > > Any solution of the above in Javascript? > > ------------------------------------------------------------ > ------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Daloradius-users mailing list > Dal...@li... > https://lists.sourceforge.net/lists/listinfo/daloradius-users > > -- -- Sincerely, Liran Tal Author <http://www.amazon.com/Agile-Software-Development-HP-Manager/dp/1484210352/>of Agile Software Development with HP Agile Manager Founder and Lead Developer of daloRADIUS <http://www.daloradius.com/>, MEAN.JS <https://github.com/meanjs/mean> Open sourcing with passion on github.com/lirantal <https://www.github.com/lirantal> Blogging at https://medium.com/@liran.tal, and tweeting at @liran_tal <https://twitter.com/liran_tal> |