1. A method for implementing a security mechanism in an integrated MEMS (Micro-Electro-Mechanical-System) device having a MEMS sensor with an output register associated with a sensing operation, the integrated MEMS device being electrically coupled to a computing system programmed to perform the method, the method comprising: in normal operation, reading from the output register an output of the sensing operation; in a test mode, determining, by a processor disposed within the computing system, a random value, wherein determining the random value includes reading from the output register, which, in the test mode, provides a value from an internal pattern generator; determining, by the processor, a validation value; reading, by the processor, the random value stored in the output register; and determining, by the processor, whether the integrated MEMS device is valid using the validation value and the random value stored in the output register.