class TwoFactor extends UnsaltedMethod {

    public static String getQrBarcodeUrl(String user, String host, String secret) {
        String format = "https://www.google.com/chart?chs=130x130&chld=M%%7C0&cht=qr&chl="
                + "otpauth://totp/"
                + "%s@%s%%3Fsecret%%3D%s";
        Escaper urlEscaper = UrlEscapers.urlFragmentEscaper();
        return String.format(format, urlEscaper.escape(user), urlEscaper.escape(host), secret);
    }

}