async fillIn(){
        //produce privateKey:
        this.x = await bigIntManager.getInRange(
            this.p.prev(),
            2
        );

        //calculate public key:
        if(this.y === undefined)
            this.y = this.g.modPow(this.x, this.p);
    }
/**
     * Fill in the empty parameters of ElGamal.
     * The engine should at least has the generator and modulus initialized.
     * Don't use this method directly.
     * @async
     * @throws Will throw an Error if one of Generator or Modulus is not provided.
     */
Fill in the empty parameters of ElGamal.
The engine should at least has the generator and modulus initialized.
Don't use this method directly.
@async
@throws Will throw an Error if one of Generator or Modulus is not provided.
Fill in the empty parameters of ElGamal . The engine should at least has the generator and modulus initialized . Don ' t use this method directly . @async @throws Will throw an Error if one of Generator or Modulus is not provided .
async fillIn(){
        this.x = await bigIntManager.getInRange(
            this.p.prev(),
            2
        );
        if(this.y === undefined)
            this.y = this.g.modPow(this.x, this.p);
    }
async fillIn ( ) { this . x = await bigIntManager . getInRange ( this . p . prev ( ) , 2 ) ; if ( this . y === undefined ) this . y = this . g . modPow ( this . x , this . p ) ; }
Fill in the empty parameters of ElGamal.
Fill in the empty parameters of ElGamal .
//produce privateKey: //calculate public key: