Is the word "trojan" used in the same way in the following two sentences?

The contents of a trojan can be a virus or a worm.

When he downloaded the free game it turned out to be a trojan.
the same meaning