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

version» Context lines:

pike.git/lib/modules/Crypto.pmod/RSA.pike:10: Inside #if constant(Gmp) && constant(Gmp.mpz) && constant(Crypto.Hash)
  protected Gmp.mpz n; /* modulo */   protected Gmp.mpz e; /* public exponent */   protected Gmp.mpz d; /* private exponent (if known) */   protected int size;      /* Extra info associated with a private key. Not currently used. */      protected Gmp.mpz p;   protected Gmp.mpz q;    + //! Can be initialized with a mapping with the elements n, e, d, p and + //! q. + protected void create(mapping(string:Gmp.mpz|int)|void params) + { +  if(!params) return; +  if( params->n && params->e ) +  set_public_key(params->n, params->e); +  if( params->d ) +  set_private_key(params->d, ({ params->p, params->q, params->n })); + } +    //! Returns the RSA modulo (n).   Gmp.mpz get_n()   {    return n;   }      //! Returns the RSA public exponent (e).   Gmp.mpz get_e()   {    return e;