diff options
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index 8f36cfb5..e37a367d 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1159,9 +1159,16 @@ reset($objects); rmdir($dir); } - } + } + + function poster_id($ip, $thread) { + global $config; + + // Confusing, hard to brute-force, but simple algorithm + return substr(sha1(sha1($ip . $config['secure_trip_salt'] . $thread) . $config['secure_trip_salt']), 0, $config['poster_id_length']); + } - function generate_tripcode ( $name, $length = 10 ) { + function generate_tripcode($name, $length = 10){ global $config; $name = stripslashes ( $name ); $t = explode('#', $name); |
