Two Turkish journalists have been sentenced to at least five years in prison for revealing state secrets.