Package org.blueoxygen.common.util

Examples of org.blueoxygen.common.util.StringUtils


                try {
                    DbBean db = new DbBean();
                    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


  }

  private void login(){
        LoginService ls = new LoginService() {
            public boolean authenticate(String string, char[] c, String string0) throws Exception {
                StringUtils stringutils = new StringUtils();
                char password[] = new char[100];
                try {
                    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();
                } 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

Related Classes of org.blueoxygen.common.util.StringUtils

Copyright © 2018 www.massapicom. 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.