Crypt_DiffieHellman
[ class tree: Crypt_DiffieHellman ] [ index: Crypt_DiffieHellman ] [ all elements ]

Class: Crypt_DiffieHellman_Math_BigInteger_Gmp

Source Location: /Crypt_DiffieHellman-0.2.6/Crypt/DiffieHellman/Math/BigInteger/Gmp.php

Class Overview


Support for arbitrary precision mathematics in PHP.


Author(s):

  • Pádraic Brady (http://blog.astrumfutura.com)

Methods


Inherited Variables

Inherited Methods


Class Details

[line 59]
Support for arbitrary precision mathematics in PHP.

Crypt_DiffieHellman_Math_BigInteger_Gmp is a wrapper across the PHP GMP extension.

  • Author: Pádraic Brady (http://blog.astrumfutura.com)
  • License: New BSD License


[ Top ]


Method Detail

add   [line 81]

string add( string $left_operand, string $right_operand)

Adds two arbitrary precision numbers
  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 

[ Top ]

compare   [line 104]

int compare( string $left_operand, string $right_operand)

Compare two big integers and returns result as an integer where 0 means both are identical, 1 that left_operand is larger, or -1 that right_operand is larger.
  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 

[ Top ]

divide   [line 116]

string|null divide( string $left_operand, string $right_operand)

Divide two big integers and return result or NULL if the denominator is zero.
  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 

[ Top ]

init   [line 69]

string init( string $operand, [int $base = 10])

Initialise a big integer into an extension specific type. This is not applicable to BCMath.
  • Access: public

Parameters:

string   $operand   — 
int   $base   — 

[ Top ]

modulus   [line 126]

string modulus( string $left_operand, $modulus, string $right_operand)

  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 
   $modulus   — 

[ Top ]

multiply   [line 136]

string multiply( string $left_operand, string $right_operand)

  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 

[ Top ]

pow   [line 146]

string pow( string $left_operand, string $right_operand)

  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 

[ Top ]

powmod   [line 156]

string powmod( string $left_operand, string $right_operand, $modulus)

  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 
   $modulus   — 

[ Top ]

sqrt   [line 166]

string sqrt( $operand, string $left_operand, string $right_operand)

  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 
   $operand   — 

[ Top ]

subtract   [line 91]

string subtract( string $left_operand, string $right_operand)

  • Access: public

Parameters:

string   $left_operand   — 
string   $right_operand   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:47:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.