Package com.openbravo.pos.util

Examples of com.openbravo.pos.util.AltEncrypter


        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

       
        this.m_bTestMode = Boolean.valueOf(props.getProperty("payment.testmode")).booleanValue();
        this.sConfigfile = props.getProperty("payment.commerceid");
        this.sClientCertPath = props.getProperty("payment.certificatePath");
        AltEncrypter cypher = new AltEncrypter("cypherkey");
        this.sPasswordCert = cypher.decrypt(props.getProperty("payment.certificatePassword").substring(6));
       
        HOST = (m_bTestMode)
                ? "staging.linkpt.net"
                : "secure.linkpt.net";
    }
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

        String sCommerceID = config.getProperty("payment.commerceid");
        String sCommercePass = config.getProperty("payment.commercepassword");
       
        if (sCommerceID != null && sCommercePass != null && sCommercePass.startsWith("crypt:")) {
            jtxtCommerceID.setText(config.getProperty("payment.commerceid"));
            AltEncrypter cypher = new AltEncrypter("cypherkey" + config.getProperty("payment.commerceid"));
            jtxtCommercePwd.setText(cypher.decrypt(config.getProperty("payment.commercepassword").substring(6)));
        }
    }
View Full Code Here

    }
   
    @Override
    public void saveProperties(AppConfig config) {
        config.setProperty("payment.commerceid", jtxtCommerceID.getText());
        AltEncrypter cypher = new AltEncrypter("cypherkey" + jtxtCommerceID.getText());      
        config.setProperty("payment.commercepassword", "crypt:" + cypher.encrypt(new String(jtxtCommercePwd.getPassword())));
    }
View Full Code Here

    /** Creates a new instance of PaymentGatewayAuthorizeNet */
    public PaymentGatewayAuthorizeNet(AppProperties props) {
        // Grab some configuration variables
        m_sCommerceID = props.getProperty("payment.commerceid");
       
        AltEncrypter cypher = new AltEncrypter("cypherkey" + props.getProperty("payment.commerceid"));
        this.m_sCommercePassword = cypher.decrypt(props.getProperty("payment.commercepassword").substring(6));

        m_bTestMode = Boolean.valueOf(props.getProperty("payment.testmode")).booleanValue();
       
        ENDPOINTADDRESS = (m_bTestMode)
                ? "https://test.authorize.net/gateway/transact.dll"
View Full Code Here

        Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
           
        // Configuracion del pago
        m_sCommerceID = props.getProperty("payment.commerceid");
       
        AltEncrypter cypher = new AltEncrypter("cypherkey" + props.getProperty("payment.commerceid"));
        this.m_sCommercePassword = cypher.decrypt(props.getProperty("payment.commercepassword").substring(6));
       
        m_bTestMode = Boolean.valueOf(props.getProperty("payment.testmode")).booleanValue();
        m_sCurrency = (Locale.getDefault().getCountry().isEmpty())
            ? Currency.getInstance("EUR").getCurrencyCode()
            : Currency.getInstance(Locale.getDefault()).getCurrencyCode();
View Full Code Here

       
        String sERPUser = config.getProperty("erp.user");
        String sERPPassword = config.getProperty("erp.password");       
        if (sERPUser != null && sERPPassword != null && sERPPassword.startsWith("crypt:")) {
            // La clave esta encriptada.
            AltEncrypter cypher = new AltEncrypter("cypherkey" + sERPUser);
            sERPPassword = cypher.decrypt(sERPPassword.substring(6));
        }       
        jtxtName.setText(sERPUser);
        jtxtPassword.setText(sERPPassword);   
       
        dirty.setDirty(false);
View Full Code Here

        config.setProperty("erp.id", jtxtId.getText());
        config.setProperty("erp.pos", jTextField2.getText());
        config.setProperty("erp.org", jTextField1.getText());
       
        config.setProperty("erp.user", jtxtName.getText());
        AltEncrypter cypher = new AltEncrypter("cypherkey" + jtxtName.getText());            
        config.setProperty("erp.password", "crypt:" + cypher.encrypt(new String(jtxtPassword.getPassword())));

        dirty.setDirty(false);
    }
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.