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

version» Context lines:

pike.git/lib/modules/Crypto.pmod/RSA.pike:74:    return this;   }      //! Compares the public key of this RSA object with another RSA   //! object.   int(0..1) public_key_equal(this_program rsa)   {    return n == rsa->get_n() && e == rsa->get_e();   }    + //! Compares the keys of this RSA object with something other. + protected int(0..1) _equal(mixed other) + { +  if (!objectp(other) || (object_program(other) != object_program(this)) || +  !public_key_equal([object(this_program)]other)) { +  return 0; +  } +  this_program rsa = [object(this_program)]other; +  return d == rsa->get_d(); + } +    //! Sets the private key.   //! @param priv   //! The private RSA exponent, often called d.   //! @param extra   //! @array   //! @elem Gmp.mpz|int 0   //! The first prime, often called p.   //! @elem Gmp.mpz|int 1   //! The second prime, often called q.   //! @endarray