Interface.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * This class forms part of a proposal for the Zend Framework. The attached
  16. * copyright will be transferred to Zend Technologies USA Inc. upon future
  17. * acceptance of that proposal:
  18. * http://framework.zend.com/wiki/pages/viewpage.action?pageId=20369
  19. *
  20. * @category Zend
  21. * @package Zend_Crypt
  22. * @subpackage Math
  23. * @copyright Copyright (c) 2007 Pádraic Brady (http://blog.astrumfutura.com)
  24. * @license http://framework.zend.com/license/new-bsd New BSD License
  25. */
  26. /**
  27. * Support for arbitrary precision mathematics in PHP.
  28. *
  29. * Interface for a wrapper across any PHP extension supporting arbitrary
  30. * precision maths.
  31. *
  32. * @category Zend
  33. * @package Zend_Crypt
  34. * @subpackage Math
  35. * @author Pádraic Brady (http://blog.astrumfutura.com)
  36. * @license http://framework.zend.com/license/new-bsd New BSD License
  37. */
  38. interface Zend_Crypt_Math_BigInteger_Interface
  39. {
  40. public function init($operand, $base = 10);
  41. public function add($left_operand, $right_operand);
  42. public function subtract($left_operand, $right_operand);
  43. public function compare($left_operand, $right_operand);
  44. public function divide($left_operand, $right_operand);
  45. public function modulus($left_operand, $modulus);
  46. public function multiply($left_operand, $right_operand);
  47. public function pow($left_operand, $right_operand);
  48. public function powmod($left_operand, $right_operand, $modulus);
  49. public function sqrt($operand);
  50. public function binaryToInteger($operand);
  51. public function integerToBinary($operand);
  52. public function hexToDecimal($operand);
  53. }