Examples of EnCrypt


Examples of cx.fbn.nevernote.evernote.EnCrypt

    dialog.exec();
    if (!dialog.okPressed()) {
      return;
    }

    EnCrypt crypt = new EnCrypt();
    String encrypted = crypt.encrypt(text, dialog.getPassword().trim(), 64);
    String decrypted = crypt.decrypt(encrypted, dialog.getPassword().trim(), 64);

    if (encrypted.trim().equals("")) {
      QMessageBox.information(this, tr("Error"), tr("Error Encrypting String"));
      return;
    }
View Full Code Here

Examples of cx.fbn.nevernote.evernote.EnCrypt

//    selectedText = text;
  }

  // Decrypt clicked text
  public void decryptText(String id, String text, String hint) {
    EnCrypt crypt = new EnCrypt();
    String plainText = null;
    Calendar currentTime = new GregorianCalendar();
    Long l = new Long(currentTime.getTimeInMillis());
    String slot = new String(Long.toString(l));
   
    // First, try to decrypt with any keys we already have
    for (int i=0; i<Global.passwordRemember.size(); i++) {
      plainText = crypt.decrypt(text, Global.passwordRemember.get(i).getFirst(), 64);
      if (plainText != null) {
        slot = new String(Long.toString(l));
        Global.passwordSafe.put(slot, Global.passwordRemember.get(i));
        removeEncryption(id, plainText, false, slot)
        return;
      }
    }
   
   
    EnDecryptDialog dialog = new EnDecryptDialog();
    dialog.setHint(hint);
    while (plainText == null || !dialog.okPressed()) {
      dialog.exec();
      if (!dialog.okPressed()) {
        return;
      }
      plainText = crypt.decrypt(text, dialog.getPassword().trim(), 64);
      if (plainText == null) {
        QMessageBox.warning(this, tr("Incorrect Password"), tr("The password entered is not correct"));
      }
    }
    Pair<String,String> passwordPair = new Pair<String,String>();
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Encrypt

         }

         operations.add(new OperationDescription<EncodingOperation>(SignatureOperation.class, targets, sign.getAlias(), null, null));
      }

      Encrypt encrypt = opConfig.getEncrypt();
      if (encrypt != null)
      {
         List<Target> targets = convertTargets(encrypt.getTargets());
         operations.add(new OperationDescription<EncodingOperation>(EncryptionOperation.class, targets, encrypt.getAlias(), null, encrypt.getAlgorithm()));
      }

      if (operations.size() == 0)
         return;
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Encrypt

         }

         operations.add(new OperationDescription<EncodingOperation>(SignatureOperation.class, targets, sign.getAlias(), null, null));
      }

      Encrypt encrypt = operationConfig.getEncrypt();
      if (encrypt != null)
      {
         List<Target> targets = convertTargets(encrypt.getTargets());
         operations.add(new OperationDescription<EncodingOperation>(EncryptionOperation.class, targets, encrypt.getAlias(), null, encrypt.getAlgorithm()));
      }

      if (operations.size() == 0)
         return;
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Encrypt

         }

         operations.add(new OperationDescription<EncodingOperation>(SignatureOperation.class, targets, sign.getAlias(), null, null));
      }

      Encrypt encrypt = operationConfig.getEncrypt();
      if (encrypt != null)
      {
         List<Target> targets = convertTargets(encrypt.getTargets());
         operations.add(new OperationDescription<EncodingOperation>(EncryptionOperation.class, targets, encrypt.getAlias(), null, encrypt.getAlgorithm()));
      }

      if (operations.size() == 0)
         return;
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Encrypt

         }

         operations.add(new OperationDescription<EncodingOperation>(SignatureOperation.class, targets, sign.getAlias(), null, null));
      }

      Encrypt encrypt = operationConfig.getEncrypt();
      if (encrypt != null)
      {
         List<Target> targets = convertTargets(encrypt.getTargets());
         operations.add(new OperationDescription<EncodingOperation>(EncryptionOperation.class, targets, encrypt.getAlias(), null, encrypt.getAlgorithm()));
      }

      if (operations.size() == 0)
         return;
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Encrypt

         }

         operations.add(new SignatureOperation(targets, sign.getAlias(), sign.getTokenRefType(), sign.getSecurityDomainAliasLabel()));
      }

      Encrypt encrypt = config.getEncrypt();
      if (encrypt != null && (!fault || encrypt.isIncludeFaults()))
      {
         List<Target> targets = convertTargets(encrypt.getTargets());
         operations.add(new EncryptionOperation(targets, encrypt.getAlias(), encrypt.getAlgorithm(), encrypt.getWrap(), encrypt.getTokenRefType(), encrypt
               .getSecurityDomainAliasLabel()));
      }

      if (operations.size() == 0)
         return;
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Encrypt

         }

         operations.add(new SignatureOperation(targets, sign.getAlias(), sign.getTokenRefType()));
      }

      Encrypt encrypt = config.getEncrypt();
      if (encrypt != null)
      {
         List<Target> targets = convertTargets(encrypt.getTargets());
         operations.add(new EncryptionOperation(targets, encrypt.getAlias(), encrypt.getAlgorithm(), encrypt.getWrap(), encrypt.getTokenRefType()));
      }

      if (operations.size() == 0)
         return;
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Encrypt

         }

         operations.add(new SignatureOperation(targets, sign.getAlias(), sign.getTokenRefType()));
      }

      Encrypt encrypt = config.getEncrypt();
      if (encrypt != null)
      {
         List<Target> targets = convertTargets(encrypt.getTargets());
         operations.add(new EncryptionOperation(targets, encrypt.getAlias(), encrypt.getAlgorithm(), encrypt.getWrap(), encrypt.getTokenRefType()));
      }

      if (operations.size() == 0)
         return;
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Encrypt

         }

         operations.add(new SignatureOperation(targets, sign.getAlias(), sign.getTokenRefType()));
      }

      Encrypt encrypt = config.getEncrypt();
      if (encrypt != null)
      {
         List<Target> targets = convertTargets(encrypt.getTargets());
         operations.add(new EncryptionOperation(targets, encrypt.getAlias(), encrypt.getAlgorithm(), encrypt.getWrap(), encrypt.getTokenRefType()));
      }

      if (operations.size() == 0)
         return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.