func GenerateOTP(z *zauth.ZAuth) (*zauth.ZAuthOtp, error) {
	t := strings.ToUpper(z.Type)
	if t == "TOTP" {
		return generateTOTP(z)
	} else {
		return generateHOTP(z)
	}
}
GenerateOTP generates TOTP/HOTP code and returns pointer to ZAuthOtp object and any errors encountered.
package otp
import (
	"strings"
	"time"
	"github.com/grijul/otpgen"
	"github.com/grijul/zauth/internal/zauth"
)