Reworked TOTP to follow RFC 6238 and added 'base32' support.