Jump to content

pally99

Members
  • Posts

    5
  • Joined

  • Last visited

pally99's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. lemminThank you for your help this was not correct requinix Thank you for your help but also not correct CORRECT ANSWER: I'm an idiot and used substr wrong! AHHHHHHHH... but thank you guys so much for being patient and offering very good suggestions I really appreciate it!
  2. Hi thanks for your help but I'm not sure this answers my question correctly, the echo is really more of a test I suppose I was just trying to make sure that my values were being stored inside the $SKEY array as array(0xA5611BCD,0xFFFAFAFF,0xFEFFFEEF,0xABCCEF01); this is why I was converting from a string back to numbers, I was trying to take the first 8 hexString characters and make them into a decimal for the first integer array etc I did not think they were being stored correctly and I still don't think they are? ok so to be much clear just take string as input: "A5611BCDFFFAFAFFFEFFFEEFABCCEF01" output: array containing four integers each with the following hex value array(0xA5611BCD,0xFFFAFAFF,0xFEFFFEEF,0xABCCEF01);
  3. Hi I appreciate your help, the code is kinda simple actually but I'm having trouble The following code echo's the WRONG result a5611bcd::0::0::abccef01 I need this following result a5611bcd::fffafaff::fefffeef::abccef01 I suspect the issue is that those two middle values are too large for integer, I know about bcmath, but whats the best way to get correct results into INTEGER form.. must be integer form, basically I my variables below are closely named sorry about this... <?php $KEY = array(0xA5611BCD,0xFFFAFAFF,0xFEFFFEEF,0xABCCEF01); /*this is the model of how everything below should end up in $SKEY $KEY = array(0xA5611BCD,0xFFFAFAFF,0xFEFFFEEF,0xABCCEF01); */ //so I begin with this string $getSKEY and try to make it into the above model $getSKEY = "A5611BCDFFFAFAFFFEFFFEEFABCCEF01"; $SKEY = array( hexdec(substr($getSKEY,0,), hexdec(substr($getSKEY,8,16)), hexdec(substr($getSKEY,16,24)), hexdec(substr($getSKEY,24,32)) ); echo dechex($SKEY[0])."::". dechex($SKEY[1])."::". dechex($SKEY[2])."::". dechex($SKEY[3]) ; ?>
  4. Oh well thank you for your response but yeah I should have mentioned I need to xor any two possible values I was just giving 1's as an example :/
  5. Hi Thanks for your help I'll just describe what I want to do any advice or if you could provide your own example it would really help, thanks again! I have a string holding hex numbers "41495ab3edde720c" and I want to get those values out of the string and represent them as hexadecimal thus 0x41495ab3edde720c, then I want to xor that hex with another hex like 0x41495ab3edde720c ^ 0x1111111111111111 then I want to take the result which will be in this example (50584BA2FCCF631D) and turn it back into a string "50584BA2FCCF631D" I'm not that good with php it seems hard to do this easily?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.