Roxen.git/
server/
base_server/
roxen.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2000-06-26
2000-06-26 17:46:19 by Per Hedbor <ph@opera.com>
a7def0985446441c25620b1e0009b66772086186 (
10
lines) (+
8
/-
2
)
[
Show
|
Annotate
]
Branch:
5.2
Use hex instead of encode_base64(), it works on NT...
Rev: server/base_server/roxen.pike:1.492
4:
// Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others. // ABS and suicide systems contributed freely by Francesco Chemolli
-
constant cvs_version="$Id: roxen.pike,v 1.
491
2000/06/
12
16
:
50
:
27
mast
Exp $";
+
constant cvs_version="$Id: roxen.pike,v 1.
492
2000/06/
26
17
:
46
:
19
per
Exp $";
// Used when running threaded to find out which thread is the backend thread, // for debug purposes only.
2636:
return 0; }
+
string tohex( string what )
+
{
+
return sprintf( "%x", Gmp.mpz( what, 256 ) );
+
}
+
static string create_key( string long_key ) { if( is_db )
2651:
name, long_key, long_key[..79], time() )); return create_key( long_key ); } else {
-
string _key=
MIME.encode_base64
(Crypto.md5()->update(long_key)->digest()
,1
);
+
string _key=
tohex
(Crypto.md5()->update(long_key)->digest());
_key = replace(_key-"=","/","="); string short_key = _key[0..1];