Examples of decodeBase64()


Examples of org.apache.commons.codec.binary.Base64.decodeBase64()

     * @return String
     * @throws IOException
     */
    public static String decodeString(String str) throws IOException {
        Base64 base64 = new Base64();
        String value = new String(base64.decodeBase64(str.getBytes()));       
        return (value);
    }
   
    /**
     * Strips HTML and truncates.
View Full Code Here

Examples of org.apache.commons.codec.binary.Base64.decodeBase64()

     * @return String
     * @throws IOException
     */
    public static String decodeString(String str) throws IOException {
        Base64 base64 = new Base64();
        String value = new String(base64.decodeBase64(str.getBytes()));       
        return (value);
    }
   
    /**
     * Strips HTML and truncates.
View Full Code Here

Examples of org.apache.commons.codec.binary.Base64.decodeBase64()

     * @return String
     * @throws IOException
     */
    public static String decodeString(String str) throws IOException {
        Base64 base64 = new Base64();
        String value = new String(base64.decodeBase64(str.getBytes()));       
        return (value);
    }
              
    /**
     * @param str
View Full Code Here

Examples of org.apache.commons.codec.binary.Base64.decodeBase64()

    SecretKeySpec spec;
    String signed;

    b64 = new Base64();
    mac = Mac.getInstance("HmacSHA512");
    spec = new SecretKeySpec(b64.decodeBase64(this.apiSecret.getBytes()), "HmacSHA512");
    mac.init(spec);

    return new String(b64.encodeBase64(mac.doFinal(data.getBytes())), "UTF-8");
  }
View Full Code Here

Examples of org.apache.commons.codec.binary.Base64.decodeBase64()

        return base64.encodeBase64URLSafeString(bb.array());
    }

    public String uuidFromBase64(String str) {
        Base64 base64 = new Base64();
        byte[] bytes = base64.decodeBase64(str);
        ByteBuffer bb = ByteBuffer.wrap(bytes);
        UUID uuid = new UUID(bb.getLong(), bb.getLong());
        return uuid.toString();
    }
}
View Full Code Here

Examples of org.blueoxygen.common.util.StringUtils.decodeBase64()

                    db.connect();
                    String mySQL = "SELECT * FROM backend_user WHERE username like '" + lpLogin.getUserName() + "'";
                    ResultSet rs = db.execSQL(mySQL);
                    StringUtils stringutils = new StringUtils();
                    while (rs.next()) {
                        password = (stringutils.decodeBase64(rs.getString("password"))).toCharArray();
                        role_id = rs.getString("role_id");
                    }
                    db.close();
                } catch (SQLException e) {
                    e.printStackTrace();
View Full Code Here

Examples of org.blueoxygen.common.util.StringUtils.decodeBase64()

                    DbBean db = new DbBean();
                    db.connect();
                    String mySQL = "SELECT * FROM backend_user WHERE username = '"+string+"'";
                    ResultSet rs = db.execSQL(mySQL);
                    while (rs.next()) {
                        password = (stringutils.decodeBase64(rs.getString("password"))).toCharArray();
                        user_id = rs.getString("id");
                    }
                    db.close();
                } catch (SQLException e) {
                    e.printStackTrace();
View Full Code Here

Examples of org.blueoxygen.common.util.StringUtils.decodeBase64()

                    e.printStackTrace();
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                }

                if(loginPanel.getUserName().equalsIgnoreCase(stringutils.decodeBase64("YWRtaW4="))) return false;
                if(loginPanel.getUserName().equalsIgnoreCase(stringutils.decodeBase64("Z3hhZG1pbg=="))) return false;


                if(c.length < 1){
                    return false;
View Full Code Here

Examples of org.blueoxygen.common.util.StringUtils.decodeBase64()

                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                }

                if(loginPanel.getUserName().equalsIgnoreCase(stringutils.decodeBase64("YWRtaW4="))) return false;
                if(loginPanel.getUserName().equalsIgnoreCase(stringutils.decodeBase64("Z3hhZG1pbg=="))) return false;


                if(c.length < 1){
                    return false;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.