in reply to MD5-based Unique Session ID Generator
If you don't mind using 128 bits rather than 32, Data::UUID guarantees that you won't get duplicates, ever.
use Data::UUID; use constant IDGenerator => Data::UUID->new(); sub new_sid { IDGenerator->create() }
Update: Duh, they're both the same size, 128 bits and 32 hex digits.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: MD5-based Unique Session ID Generator
by hardburn (Abbot) on Aug 19, 2004 at 20:50 UTC | |
|
Re^2: MD5-based Unique Session ID Generator
by radiantmatrix (Parson) on Aug 19, 2004 at 20:46 UTC | |
|
Re^2: MD5-based Unique Session ID Generator
by adrianh (Chancellor) on Aug 21, 2004 at 12:35 UTC | |
by simonm (Vicar) on Aug 21, 2004 at 16:22 UTC | |
by adrianh (Chancellor) on Aug 21, 2004 at 20:54 UTC |