dd10eb1997-03-04Niels Möller /* Crypto.pmod * */
a580e12000-09-27Fredrik Hübinette (Hubbe) #pike __REAL_VERSION__
a20af62000-09-26Fredrik Hübinette (Hubbe) 
e424aa1997-11-19Fredrik Hübinette (Hubbe) static private mixed crypto_module;
dd10eb1997-03-04Niels Möller  mixed `[](string name) {
1ee6941997-05-30Henrik Grubbström (Grubba)  catch {
e424aa1997-11-19Fredrik Hübinette (Hubbe)  return (crypto_module[name]
1ee6941997-05-30Henrik Grubbström (Grubba)  || ((program) ("Crypto/" + name)) || ((object) ("Crypto/" + name + ".pmod"))); };
f497c61997-12-20Henrik Grubbström (Grubba)  return ([])[0]; // UNDEFINED
dd10eb1997-03-04Niels Möller }
cf5d562001-11-05Martin Nilsson array(string) _indices() { array tmp = ( __FILE__ / "/"); tmp[-1] = "Crypto"; tmp = get_dir(tmp*"/"); return map(glob("*.pike",tmp)+glob("*.pmod",tmp), lambda(string in){ return in[..sizeof(in)-6]; }) + indices(crypto_module); }
e424aa1997-11-19Fredrik Hübinette (Hubbe) void create() { catch { crypto_module=master()->resolv("_Crypto"); }; if(!crypto_module) crypto_module=master()->resolv("_Lobotomized_Crypto"); }