pike.git / lib / modules / Crypto.pmod / DH.pmod

version» Context lines:

pike.git/lib/modules/Crypto.pmod/DH.pmod:109:    //! The prime for the group.    //!    //! @param g    //! The generator for the group. Defaults to @expr{2@}.    //!    //! @param q    //! The order of the group. Defaults to @expr{(p-1)/2@}.    protected variant void create(Gmp.mpz|int p, Gmp.mpz|int|void g,    Gmp.mpz|int|void q)    { -  this_program::p = Gmp.mpz(p); -  this_program::g = g && Gmp.mpz(g) || Gmp.mpz(2); -  this_program::q = q && Gmp.mpz(q) || Gmp.mpz( [int](p-1)/2 ); +  this::p = Gmp.mpz(p); +  this::g = g && Gmp.mpz(g) || Gmp.mpz(2); +  this::q = q && Gmp.mpz(q) || Gmp.mpz( [int](p-1)/2 );    }       protected string _sprintf(int t)    {    if( t!='O' ) return UNDEFINED;    mapping(string:mixed) m = mkmapping([array(string)]indices(Crypto.DH),    values(Crypto.DH));    foreach(m; string id; mixed val)    if( val==this ) return sprintf("Crypto.DH.%s", id);    return sprintf("%O(%O, %O, %O)", this_program, p, g, q);