export(deep){
        let r = undefined;
        if(deep){
            r = this.lastEncryptionKey;
            this.lastEncryptionKey = undefined;
        }
        return {
            r,
            security: this.securityLevel,
            ...(this.securityLevel === 'LOW'? {x: this.x} : undefined),
            g: this.g,
            p: this.p,
            y: this.g.modPow(this.x, this.p)
        };
    }
/**
     * This method will export the ElGamal engine so that you can build it again completely.
     * @param {boolean} deep if true then some last secret key will be revealed and removed from
     * ElGamal for security sake.
     * @returns {Engine} The exported ElGamal engine, you can import it easily by calling import() method
     */
This method will export the ElGamal engine so that you can build it again completely.
@param {boolean} deep if true then some last secret key will be revealed and removed from
ElGamal for security sake.
@returns {Engine} The exported ElGamal engine, you can import it easily by calling import() method
This method will export the ElGamal engine so that you can build it again completely . @param { boolean } deep if true then some last secret key will be revealed and removed from ElGamal for security sake . @returns { Engine } The exported ElGamal engine you can import it easily by calling import () method
export(deep){
        let r = undefined;
        if(deep){
            r = this.lastEncryptionKey;
            this.lastEncryptionKey = undefined;
        }
        return {
            r,
            security: this.securityLevel,
            ...(this.securityLevel === 'LOW'? {x: this.x} : undefined),
            g: this.g,
            p: this.p,
            y: this.g.modPow(this.x, this.p)
        };
    }
export ( deep ) { let r = undefined ; if ( deep ) { r = this . lastEncryptionKey ; this . lastEncryptionKey = undefined ; } return { r , security : this . securityLevel , ... ( this . securityLevel === 'LOW' ? { x : this . x } : undefined ) , g : this . g , p : this . p , y : this . g . modPow ( this . x , this . p ) } ; }
This method will export the ElGamal engine so that you can build it again completely.
This method will export the ElGamal engine so that you can build it again completely .