Exemplo n.º 1
0
function makeCiphers() {
  global $cipher, $encrypt_key, $session, $session_cipher;
  if ($encrypt_key != '') {
    if ($cipher == '') {
      $cipher = new Cipher($encrypt_key);
      if ($session != '') $session = $cipher->decrypthex($session);
    }
    if ($session_cipher == '' && $session != '') {
      $session_key = bcxorhex($session, $encrypt_key);
      $session_cipher = new Cipher($session_key);
    }
  }
}
Exemplo n.º 2
0
 function xorLocations($l1, $l2)
 {
     return $this->leftPadHex(bcxorhex($l1, $l2), 32);
 }