Auth_OpenID_DiffieHellman::__construct PHP Метод

__construct() публичный Метод

public __construct ( $mod = null, $gen = null, $private = null, $lib = null )
    function __construct($mod = null, $gen = null, $private = null, $lib = null)
    {
        if ($lib === null) {
            $this->lib = Auth_OpenID_getMathLib();
        } else {
            $this->lib = $lib;
        }
        if ($mod === null) {
            $this->mod = $this->lib->init(Auth_OpenID_getDefaultMod());
        } else {
            $this->mod = $mod;
        }
        if ($gen === null) {
            $this->gen = $this->lib->init(Auth_OpenID_getDefaultGen());
        } else {
            $this->gen = $gen;
        }
        if ($private === null) {
            $r = $this->lib->rand($this->mod);
            $this->private = $this->lib->add($r, 1);
        } else {
            $this->private = $private;
        }
        $this->public = $this->lib->powmod($this->gen, $this->private, $this->mod);
    }