pike.git / lib / modules / SSL.pmod / https.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/https.pike:1: - /* $Id: https.pike,v 1.8 1999/03/17 02:53:34 grubba Exp $ + /* $Id: https.pike,v 1.9 2000/03/28 13:03:43 grubba Exp $    *    * dummy https server    */      #define PORT 25678      import Stdio;      inherit "sslport";   
pike.git/lib/modules/SSL.pmod/https.pike:63:    }       void create(object f)    {    sslfile = f;    sslfile->set_nonblocking(read_callback, 0, 0);    }   }      class no_random { -  object rc4 = Crypto.rc4(); +  object arcfour = Crypto.arcfour();       void create(string|void secret)    {    if (!secret)    secret = sprintf("Foo!%4c", time());    object sha = Crypto.sha();    sha->update(secret); -  rc4->set_encrypt_key(sha->digest()); +  arcfour->set_encrypt_key(sha->digest());    }       string read(int size)    { -  return rc4->crypt(replace(allocate(size), 0, "\021") * ""); +  return arcfour->crypt(replace(allocate(size), 0, "\021") * "");    }   }      /* PKCS#1 Private key structure:      RSAPrivateKey ::= SEQUENCE {    version Version,    modulus INTEGER, -- n    publicExponent INTEGER, -- e    privateExponent INTEGER, -- d