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

version» Context lines:

pike.git/lib/7.8/modules/Crypto.pmod/RSA.pike:300:    return p;   }      //! Generate a valid RSA key pair with the size @[bits]. A random   //! function may be provided as arguemnt @[r], otherwise   //! @[Crypto.Random.random_string] will be used. Keys must be at least   //! 128 bits.   this_program generate_key(int(128..) bits, function(int:string)|void r)   {    if (!r) -  r = [function(int:string)]Crypto.Random.random_string; +  r = Crypto.Random.random_string;    if (bits < 128)    error( "Ridiculously small key.\n" );       /* NB: When multiplying two n-bit integers,    * you're most likely to get an (2n - 1)-bit result.    * We therefore add an extra bit to s2.    *    * cf [bug 6620].    */