As others have noted: Cryptonomicon.
...but that basic idea did give me another one: electromagnets on a separate circuit inside the drive enclosure or laptop body.
Fail to pass a security check on schedule and the circuit is engaged, destroying the HDD.
I'm no hardware wizz although I did make a motor out of a nail and copper wire once.