Hastert doesn't have a law named after him. There's the Hastert Rule, which is an informal rule that no bill should be brought before the House to vote on it unless it already has the support of the majority of the majority party.
Hastert was convicted of structuring withdrawals to avoid reporting requirements and making false statements. The charges themselves were not inherently about homosexuality, though it came about from him covering up his same-sex abuse of a minor, and the indictment didn't mention the sexual abuse, and his allocution under the plea deal didn't initially mention it. He did admit it under pressure from the judge, who seemed to start to lean against accepting his plea without him admitting to the molestation, for which he could not be charged because the statute of limitations had expired decades prior.
Hastert has never come out as gay. Most child molesters, even those who molest the same sex, never identify as homosexual.