code: public static String getTotp(String secret) {
          Objects.requireNonNull(secret, Required.SECRET.toString());
          
          String value = null;
          try {
              TOTP builder = TOTP.key(secret.getBytes(StandardCharsets.US_ASCII.name()))
                      .timeStep(TimeUnit.SECONDS.toMillis(PERIOD))
                      .digits(DIGITS)
                      .hmacSha(ALGORITHM)
                      .build();
              
              value = builder.value();
          } catch (UnsupportedEncodingException e) {
              LOG.error("Failed to create TOTP",  e);
          }
          
          return value;
      }
docs: Creates the current TOTP based on the following default values:
  SHA512 algorithm, 6 digits, 30 seconds time period
  
  @param secret The secret to use
  
  @return The totp value or null if generation failed