diff -r 000000000000 -r 4eba9c11703f web/Zend/Crypt/Math.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Crypt/Math.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,102 @@ + 127) { + return "\x00" . $long; + } + return $long; + } + + /** + * Translate a binary form into a big integer string + * + * @param string $binary + * @return string + */ + public function fromBinary($binary) { + return $this->_math->binaryToInteger($binary); + } + + /** + * Translate a big integer string into a binary form + * + * @param string $integer + * @return string + */ + public function toBinary($integer) + { + return $this->_math->integerToBinary($integer); + } + +}