Package de.willuhn.jameica.security

Examples of de.willuhn.jameica.security.Wallet


  /**
   * @see de.willuhn.jameica.gui.dialogs.AbstractDialog#paint(org.eclipse.swt.widgets.Composite)
   */
  protected void paint(Composite parent) throws Exception
  {
    Wallet wallet = Settings.getWallet();
    List<Entry> entries = new ArrayList<Entry>();
    Enumeration e = wallet.getKeys();
    while (e.hasMoreElements())
    {
      String key = (String) e.nextElement();
      entries.add(new Entry(key,wallet.get(key)));
    }
   
    TablePart table = new TablePart(entries,null);
    table.addColumn(i18n.tr("Name"),"name");
    table.addColumn(i18n.tr("Wert"),"value");
View Full Code Here


        // im PassportHandle verarbeitet
        case NEED_PASSPHRASE_LOAD:
        case NEED_PASSPHRASE_SAVE:
         
          // Passwort aus dem Wallet laden
          Wallet w = Settings.getWallet();
          String pw = (String) w.get("hbci.passport.password." + passport.getClass().getName());
          if (pw != null && pw.length() > 0)
          {
            Logger.debug("using passport key from wallet, passport: " + passport.getClass().getName());
            retData.replace(0,retData.length(),pw);
            break;
          }
           
          // noch kein Passwort definiert. Dann erzeugen wir ein zufaelliges.
          Logger.debug("creating new random passport key, passport: " + passport.getClass().getName());
          byte[] pass = new byte[8];
          SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
          random.nextBytes(pass);
          pw = Base64.encode(pass);

          // Und speichern es im Wallet.
          w.set("hbci.passport.password." + passport.getClass().getName(),pw);
          retData.replace(0,retData.length(),pw);
          break;

        case NEED_CONNECTION:
          if (!Settings.getOnlineMode())
View Full Code Here

   * @throws Exception
   */
  public static Wallet getWallet() throws Exception
  {
    if (wallet == null)
      wallet = new Wallet(HBCI.class);
   
    return wallet;
  }
View Full Code Here

TOP

Related Classes of de.willuhn.jameica.security.Wallet

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.