My brother does this with his Surface laptop.

How I turned an old USB drive into a secure unlock key for my PC