Add secure string comparison function