Package org.kapott.hbci.passport

Examples of org.kapott.hbci.passport.INILetter


    public void callback(HBCIPassport passport, int reason, String msg, int datatype, StringBuffer retData)
    {
        getOutStream().println(HBCIUtilsInternal.getLocMsg("CALLB_PASS_IDENT",passport.getClientData("init")));
       
        try {
            INILetter iniletter;
            LogFilter logfilter=LogFilter.getInstance();
            Date      date;
            String    st;
           
            switch (reason) {
                case NEED_PASSPHRASE_LOAD:
                case NEED_PASSPHRASE_SAVE:
                    getOutStream().print(msg+": ");
                    getOutStream().flush();
                   
                    st=getInStream().readLine();
                    if (reason==NEED_PASSPHRASE_SAVE) {
                        getOutStream().print(msg+" (again): ");
                        getOutStream().flush();
                       
                        String st2=getInStream().readLine();
                        if (!st.equals(st2))
                            throw new InvalidUserDataException(HBCIUtilsInternal.getLocMsg("EXCMSG_PWDONTMATCH"));
                    }
                    logfilter.addSecretData(st,"X",LogFilter.FILTER_SECRETS);
                    retData.replace(0,retData.length(),st);
                    break;
   
                case NEED_CHIPCARD:
                    getOutStream().println(msg);
                    break;
   
                case NEED_HARDPIN:
                    getOutStream().println(msg);
                    break;
   
                case NEED_SOFTPIN:
                case NEED_PT_PIN:
                case NEED_PT_TAN:
                case NEED_PROXY_PASS:
                    getOutStream().print(msg+": ");
                    getOutStream().flush();
                    String secret=getInStream().readLine();
                    logfilter.addSecretData(secret,"X",LogFilter.FILTER_SECRETS);
                    retData.replace(0,retData.length(),secret);
                    break;
   
                case HAVE_HARDPIN:
                    HBCIUtils.log("end of entering hardpin",HBCIUtils.LOG_DEBUG);
                    break;
   
                case HAVE_CHIPCARD:
                    HBCIUtils.log("end of waiting for chipcard",HBCIUtils.LOG_DEBUG);
                    break;
   
                case NEED_COUNTRY:
                case NEED_BLZ:
                case NEED_HOST:
                case NEED_PORT:
                case NEED_FILTER:
                case NEED_USERID:
                case NEED_CUSTOMERID:
                case NEED_PROXY_USER:
                    getOutStream().print(msg+" ["+retData.toString()+"]: ");
                    getOutStream().flush();
                    st=getInStream().readLine();
                    if (st.length()==0)
                        st=retData.toString();
                   
                    if (reason==NEED_BLZ) {
                      logfilter.addSecretData(st,"X",LogFilter.FILTER_MOST);
                    } else if (reason==NEED_USERID || reason==NEED_CUSTOMERID || reason==NEED_PROXY_USER) {
                      logfilter.addSecretData(st,"X",LogFilter.FILTER_IDS);
                    }
                   
                    retData.replace(0,retData.length(),st);
                    break;
   
                case NEED_NEW_INST_KEYS_ACK:
                    getOutStream().println(msg);
                    iniletter=new INILetter(passport,INILetter.TYPE_INST);
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("EXPONENT")+": "+HBCIUtils.data2hex(iniletter.getKeyExponentDisplay()));
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("MODULUS")+": "+HBCIUtils.data2hex(iniletter.getKeyModulusDisplay()));
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("HASH")+": "+HBCIUtils.data2hex(iniletter.getKeyHashDisplay()));
                    getOutStream().print("<ENTER>=OK, \"ERR\"=ERROR: ");
                    getOutStream().flush();
                    retData.replace(0, retData.length(), getInStream().readLine());
                    break;
   
                case HAVE_NEW_MY_KEYS:
                    iniletter=new INILetter(passport,INILetter.TYPE_USER);
                    date=new Date();
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("DATE")+": "+HBCIUtils.date2StringLocal(date));
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("TIME")+": "+HBCIUtils.time2StringLocal(date));
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("BLZ")+": "+passport.getBLZ());
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("USERID")+": "+passport.getUserId());
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("KEYNUM")+": "+passport.getMyPublicSigKey().num);
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("KEYVERSION")+": "+passport.getMyPublicSigKey().version);
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("EXPONENT")+": "+HBCIUtils.data2hex(iniletter.getKeyExponentDisplay()));
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("MODULUS")+": "+HBCIUtils.data2hex(iniletter.getKeyModulusDisplay()));
                    getOutStream().println(HBCIUtilsInternal.getLocMsg("HASH")+": "+HBCIUtils.data2hex(iniletter.getKeyHashDisplay()));
                    getOutStream().println(msg);
                    break;
   
                case HAVE_INST_MSG:
                    getOutStream().println(msg);
View Full Code Here


                    retData.setLength(0);
                    retData.append("dummy");
                    break;
                   
                case NEED_NEW_INST_KEYS_ACK:
                    INILetter iniletter=new INILetter(passport,INILetter.TYPE_INST);
                    data.setProperty("hash",HBCIUtils.data2hex(iniletter.getKeyHashDisplay()));
                    break;
                   
                case NEED_CONNECTION:
                case HAVE_INST_MSG:
                case CLOSE_CONNECTION:
View Full Code Here

    this.passport = p;

    setTitle(i18n.tr("INI-Brief erzeugen/anzeigen"));
    setSize(WINDOW_WIDTH,SWT.DEFAULT);

    iniletter = new INILetter(passport,INILetter.TYPE_USER);
  }
View Full Code Here

                constr.anchor=GridBagConstraints.NORTHWEST;
                constr.fill=GridBagConstraints.HORIZONTAL;
                constr.insets=new Insets(4,0,4,8);
               
                HBCIPassport passport=(HBCIPassport)currentData.get("passport");
                INILetter iniletter=new INILetter(passport,INILetter.TYPE_INST);
               
                String exp_st=HBCIUtils.data2hex(iniletter.getKeyExponentDisplay());
                String mod_st=HBCIUtils.data2hex(iniletter.getKeyModulusDisplay());
                String hash_st=HBCIUtils.data2hex(iniletter.getKeyHashDisplay());
                Font font=new Font("Monospaced",Font.PLAIN,10);
   
                constr.gridx=0;constr.gridy=0;constr.gridheight=8;
                table.add(new JLabel(HBCIUtilsInternal.getLocMsg("EXPONENT")),constr);
                constr.gridx++;constr.gridheight=1;
View Full Code Here

                constr.anchor=GridBagConstraints.NORTHWEST;
                constr.fill=GridBagConstraints.HORIZONTAL;
                constr.insets=new Insets(4,0,4,8);
               
                HBCIPassport passport=(HBCIPassport)currentData.get("passport");
                INILetter iniletter=new INILetter(passport,INILetter.TYPE_USER);
               
                String exp_st=HBCIUtils.data2hex(iniletter.getKeyExponentDisplay());
                String mod_st=HBCIUtils.data2hex(iniletter.getKeyModulusDisplay());
                String hash_st=HBCIUtils.data2hex(iniletter.getKeyHashDisplay());
                Font font=new Font("Monospaced",Font.PLAIN,10);

                Date date=new Date();               
                constr.gridx=0;constr.gridy=0;
                table.add(new JLabel(HBCIUtilsInternal.getLocMsg("DATE")),constr);
View Full Code Here

      "Bitte vergleichen Sie die von der Bank �bermittelten Hash-Werte (Checksummen)\n" +
      "mit denen in Ihren Unterlagen. Stimmen diese mit den folgenden Werten �berein,\n" +
      "dann best�tigen Sie bitte mit OK.\n" +
      "Andernfalls brechen Sie den Vorgang aus Sicherheitsgr�nden bitte ab."),true);

    INILetter iniletter = new INILetter(passport,INILetter.TYPE_INST);

    group.addHeadline(i18n.tr("Hashwert"));
    group.addText(HBCIUtils.data2hex(iniletter.getKeyHashDisplay()).toUpperCase(),true,Color.ERROR);
   
    group.addHeadline(i18n.tr("Exponent"));
    group.addText(HBCIUtils.data2hex(iniletter.getKeyExponentDisplay()).toUpperCase(),true);

    group.addHeadline(i18n.tr("Modulus"));
    group.addText(HBCIUtils.data2hex(iniletter.getKeyModulusDisplay()).toUpperCase(),true);


    ButtonArea buttons = new ButtonArea();
    buttons.addButton(i18n.tr("OK"),new Action()
    {
View Full Code Here

TOP

Related Classes of org.kapott.hbci.passport.INILetter

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.