A hacker has been sentenced to 30 years in prison for his role in the theft of 45 million identities.