pike.git / src / post_modules / Nettle / hogweed.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/hogweed.cmod:549:    apply_current(Nettle_ECC_Curve_Point_program_fun_num, 2);    }       /*! @decl Point point_mul(Gmp.mpz|int x, Gmp.mpz|int y, @    *! Gmp.mpz|int scalar)    *!    *! Multiply a point on the curve by a scalar.    *!    *! A typical use is for Elliptic Curve Diffie Hellman (ECDH) key exchange.    *! -  *! This is equivalent to @code{(Point(x, y) * scalar)@}. +  *! This is equivalent to @expr{(Point(x, y) * scalar)@}.    *!    *! @returns    *! Returns the new @[Point] on the curve.    *!    *! @throws    *! Throws an error if the point (@[x], @[y]) isn't on the curve.    */    PIKEFUN Nettle_ECC_Curve_Point point_mul(object(Gmp.mpz)|int x,    object(Gmp.mpz)|int y,    object(Gmp.mpz)|int scalar)
pike.git/src/post_modules/Nettle/hogweed.cmod:663:    (((const struct Nettle_ECC_Curve_struct *)parent_storage(1, Nettle_ECC_Curve_program))->curve);    if (!curve) return;    ecc_point_clear(&THIS->point);    }       /*! @decl protected local int(0..1) _equal(mixed x)    *!    *! @returns    *! Returns @expr{1@} if @[x] is a @[Point] on the same    *! @[Curve] and has the same coordinates, and otherwise -  *! returns @expr@{0@} (zero). +  *! returns @expr{0@} (zero).    */    PIKEFUN int(0..1) _equal(mixed x)    flags ID_PROTECTED|ID_LOCAL;    {    struct inherit *inh;    struct program *p;    const struct ecc_point *xp;    if (!x || (TYPEOF(*x) != PIKE_T_OBJECT) ||    !x->u.object || !x->u.object->prog) RETURN 0;    p = x->u.object->prog;