/** * add(): Make a new nonce, insert in the TABLE, and return it. * @return string New nonce, or false if add failed. */ public static function add() { self::clean(); $nonce = TlonHash::hash(TlonHash::salt(), $_SERVER['REMOTE_ADDR']); if (TlonData::insert(self::$TABLE, array($nonce, time()))) { return $nonce; } else { return false; } }