Package com.openbravo.pos.util

Examples of com.openbravo.pos.util.AltEncrypter


            String sDBUser = props.getProperty("db.user");
            String sDBPassword = props.getProperty("db.password");       
            if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
                // the password is encrypted
                AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
                sDBPassword = cypher.decrypt(sDBPassword.substring(6));
            }  

             return new Session(props.getProperty("db.URL"), sDBUser,sDBPassword);    

        } catch (InstantiationException e) {
View Full Code Here


            String sDBUser = props.getProperty("db.user");
            String sDBPassword = props.getProperty("db.password");       
            if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
                // the password is encrypted
                AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
                sDBPassword = cypher.decrypt(sDBPassword.substring(6));
            }  

             return new Session(props.getProperty("db.URL"), sDBUser,sDBPassword);    

        } catch (InstantiationException e) {
View Full Code Here

                       
                m_sERPUser = prop.getProperty("user");
                m_sERPPassword = prop.getProperty("password");       
                if (m_sERPUser != null && m_sERPPassword != null && m_sERPPassword.startsWith("crypt:")) {
                    // La clave esta encriptada.
                    AltEncrypter cypher = new AltEncrypter("key" + m_sERPUser);
                    m_sERPPassword = cypher.decrypt(m_sERPPassword.substring(6));
                }
                m_sERPPassword = getPasswordHash(m_sERPPassword);
                m_iERPId = prop.getProperty("id");
                m_iERPOrg = prop.getProperty("org");
                m_iERPPos = prop.getProperty("pos");
View Full Code Here

        String sCertificatePass = config.getProperty("payment.certificatePassword");
        String sCertificatePath = config.getProperty("payment.certificatePath");
       
        if (sCommerceID!=null && sCertificatePath!=null && sCertificatePass!=null && sCertificatePass.startsWith("crypt:")) {
            jtxtStoreName.setText(config.getProperty("payment.commerceid"));
            AltEncrypter cypher = new AltEncrypter("cypherkey");
            jtxtCertificatePass.setText(cypher.decrypt(config.getProperty("payment.certificatePassword").substring(6)));
            jtxtCertificatePath.setText(config.getProperty("payment.certificatePath"));
        }
    }
View Full Code Here

        }
    }
   
    @Override
    public void saveProperties(AppConfig config) {
        AltEncrypter cypher = new AltEncrypter("cypherkey");     
        config.setProperty("payment.commerceid", comboValue(jtxtStoreName.getText()));
        config.setProperty("payment.certificatePath", comboValue(jtxtCertificatePath.getText()));
        config.setProperty("payment.certificatePassword", "crypt:" + cypher.encrypt(new String(jtxtCertificatePass.getPassword())));
    }
View Full Code Here

        if (wsPayID == null || wsPayID.equals("")) {
            wsPayID="1";
        }


        AltEncrypter cypher = new AltEncrypter("cypherkey" + user);
        try {
            String password = cypher.decrypt(WSInfo.getWspassword().substring(6));
            wsLogin.setPassword(password);
        } catch (NullPointerException npe) {
            throw new BasicException(AppLocal.getIntString("message.propsnotdefined"));
        }
View Full Code Here

        String sCommerceSign = config.getProperty("payment.commercesign");
        String sCommerceSHA = config.getProperty("payment.SHA");
       
        if (sCommerceID!=null && sCommerceTerminal!=null && sCommerceSign!=null && sCommerceSHA!=null && sCommerceSign.startsWith("crypt:")) {
            jtxtCommerceCode.setText(config.getProperty("payment.commerceid"));
            AltEncrypter cypher = new AltEncrypter("cypherkey");
            jtxtCommerceTerminal.setText(comboValue(config.getProperty("payment.terminal")));
            jtxtCommerceSign.setText(cypher.decrypt(config.getProperty("payment.commercesign").substring(6)));
            jCheckBox1.setSelected(Boolean.valueOf(config.getProperty("payment.SHA")).booleanValue());
        }
    
    }
View Full Code Here

   
    @Override
    public void saveProperties(AppConfig config) {
        config.setProperty("payment.commerceid", comboValue(jtxtCommerceCode.getText()));
        config.setProperty("payment.terminal", comboValue(jtxtCommerceTerminal.getText()));
        AltEncrypter cypher = new AltEncrypter("cypherkey");
        config.setProperty("payment.commercesign", "crypt:" + cypher.encrypt(new String(jtxtCommerceSign.getPassword())));
        config.setProperty("payment.SHA", comboValue(jCheckBox1.isSelected()));
    }
View Full Code Here

        String sCertificatePass = config.getProperty("payment.certificatePassword");
        String sCertificatePath = config.getProperty("payment.certificatePath");
       
        if (sCommerceID!=null && sCertificatePath!=null && sCertificatePass!=null && sCertificatePass.startsWith("crypt:")) {
            jtxtStoreName.setText(config.getProperty("payment.commerceid"));
            AltEncrypter cypher = new AltEncrypter("cypherkey");
            jtxtCertificatePass.setText(cypher.decrypt(config.getProperty("payment.certificatePassword").substring(6)));
            jtxtCertificatePath.setText(config.getProperty("payment.certificatePath"));
        }
    }
View Full Code Here

        }
    }
   
    @Override
    public void saveProperties(AppConfig config) {
        AltEncrypter cypher = new AltEncrypter("cypherkey");     
        config.setProperty("payment.commerceid", comboValue(jtxtStoreName.getText()));
        config.setProperty("payment.certificatePath", comboValue(jtxtCertificatePath.getText()));
        config.setProperty("payment.certificatePassword", "crypt:" + cypher.encrypt(new String(jtxtCertificatePass.getPassword())));
    }
View Full Code Here

TOP

Related Classes of com.openbravo.pos.util.AltEncrypter

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.