· 7 years ago · Nov 16, 2018, 04:28 PM
1Date now = new Date(); 2 SecretKey secretKey = "MJY8K2MFJL2N4JCF";//secretKey must be Key type, not String 3 System.out.format("Current password: %06dn", totp.generateOneTimePassword(secretKey, now));