Added a function for validating TOTP values and the needed tests.