[ Index ]

PHP Cross Reference of DokuWiki




/vendor/phpseclib/phpseclib/phpseclib/Math/ -> BinaryField.php (summary)

Binary Finite Fields Utilizes the factory design pattern

Author: Jim Wigginton
Copyright: 2017 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
File Size: 203 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BinaryField:: (7 methods):

Class: BinaryField  - X-Ref

Binary Finite Fields

__construct(...$indices)   X-Ref
Default constructor

newInteger($num)   X-Ref
Returns an instance of a dynamically generated PrimeFieldInteger class

return: Integer
param: string $num

randomInteger()   X-Ref
Returns an integer on the finite field between one and the prime modulo

return: Integer

getLengthInBytes()   X-Ref
Returns the length of the modulo in bytes

return: int

getLength()   X-Ref
Returns the length of the modulo in bits

return: int

base2ToBase256($x, $size = null)   X-Ref
Converts a base-2 string to a base-256 string

return: string
param: string $x
param: int|null $size

base256ToBase2($x)   X-Ref
Converts a base-256 string to a base-2 string

return: string
param: string $x