Examples of Crypt


Examples of cloudsync.helper.Crypt

      String[] excludePatterns = options.getExcludePatterns();
      if (excludePatterns != null) {
        LOGGER.log(Level.FINEST, "use exclude pattern: " + "[^" + StringUtils.join(excludePatterns, "$] | [$") + "$]");
      }

      handler = new Handler(name, localConnection, remoteConnector, new Crypt(options.getPassphrase()), options.getDuplicate(), options.getFollowLinks(), options.getPermissionType());
      handler.init(type, options.getCacheFile(), options.getLockFile(), options.getPIDFile(), options.getNoCache(), options.getForceStart());

      switch (type) {
      case BACKUP:
        handler.backup(!options.isTestRun(), includePatterns, excludePatterns);
View Full Code Here

Examples of org.kapott.hbci.security.Crypt

                HBCIUtils.log("trying to encrypt message",HBCIUtils.LOG_DEBUG);
                HBCIUtilsInternal.getCallback().status(mainPassport,HBCICallback.STATUS_MSG_CRYPT,null);
               
                // nachricht verschl�sseln
                MSG   old=msg;
                Crypt crypt=CryptFactory.getInstance().createCrypt(getParentHandlerData(),old);
                try {
                    msg=crypt.cryptIt("Crypted");
                } finally {
                    CryptFactory.getInstance().unuseObject(crypt);
                    if (msg!=old) {
                        MSGFactory.getInstance().unuseObject(old);
                    }
                }
               
                if (!msg.getName().equals("Crypted")) {
                    String errmsg=HBCIUtilsInternal.getLocMsg("EXCMSG_CANTCRYPT");
                    if (!HBCIUtilsInternal.ignoreError(null,"client.errors.ignoreCryptErrors",errmsg))
                        throw new HBCI_Exception(errmsg);
                }

                // verschl�sselte nachricht patchen
                for (int i=0;i<rewriters.length;i++) {
                    MSG oldMsg=msg;
                    msg=rewriters[i].outgoingCrypted(oldMsg,gen);
                    if (msg!=oldMsg) {
                        MSGFactory.getInstance().unuseObject(oldMsg);
                    }
                }
               
                HBCIUtils.log("encrypted message to be sent: "+msg.toString(0),HBCIUtils.LOG_DEBUG2);
            }

            // basic-values der ausgehenden nachricht merken
            String msgPath=msg.getPath();
            String msgnum=msg.getValueOfDE(msgPath+".MsgHead.msgnum");
            String dialogid=msg.getValueOfDE(msgPath+".MsgHead.dialogid");
            String hbciversion=msg.getValueOfDE(msgPath+".MsgHead.hbciversion");
           
            // nachricht versenden und antwortnachricht empfangen
            HBCIUtils.log("communicating dialogid/msgnum "+dialogid+"/"+msgnum,HBCIUtils.LOG_DEBUG);
            MSG old=msg;
            msg=mainPassport.getComm().pingpong(currentMsgName,old);
            if (msg!=old) {
                MSGFactory.getInstance().unuseObject(old);
            }

            // ist antwortnachricht verschl�sselt?
            boolean crypted=msg.getName().equals("CryptedRes");
            if (crypted) {
                HBCIUtilsInternal.getCallback().status(mainPassport,HBCICallback.STATUS_MSG_DECRYPT,null);
               
                // wenn ja, dann nachricht entschl�sseln
                Crypt  crypt=CryptFactory.getInstance().createCrypt(getParentHandlerData(),msg);
                String newmsgstring;
                try {
                    newmsgstring=crypt.decryptIt();
                } finally {
                    CryptFactory.getInstance().unuseObject(crypt);
                }
                gen.set("_origSignedMsg",newmsgstring);
               
View Full Code Here

Examples of org.kapott.hbci.security.Crypt

      super(Integer.parseInt(HBCIUtils.getParam("kernel.objpool.Crypt","8")));
    }
   
    public Crypt createCrypt(IHandlerData handlerdata, MSG msg)
    {
        Crypt ret=(Crypt)getFreeObject();
       
        if (ret==null) {
            ret=new Crypt(handlerdata,msg);
            addToUsedPool(ret);
        } else {
            try {
                ret.init(handlerdata,msg);
                addToUsedPool(ret);
            } catch (RuntimeException e) {
                addToFreePool(ret);
                throw e;
            }
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.