I'm to implement the RFC6238 to deliver a ten-digit TOTP password, that may be used in a POST ask for later on. The sample input and output with the TOTP is alleged to be such as this: Here is the 2nd code in Java which is basically a modified Variation of your Java implementation present