byte[] recdata = recipient.getContent(getCAToken().getPrivateKey(SecConst.CAKEYPURPOSE_KEYENCRYPT),getCAToken().getProvider());
byte[] recdata = recipient.getContent(getCAToken().getPrivateKey(SecConst.CAKEYPURPOSE_KEYENCRYPT),"BC");
    public KeyPair decryptKeys(byte[] data) throws Exception{    	CMSEnvelopedData ed = new CMSEnvelopedData(data);   	    	    	     		RecipientInformationStore  recipients = ed.getRecipientInfos();           	    	Iterator    it =  recipients.getRecipients().iterator();    	RecipientInformation   recipient = (RecipientInformation) it.next();    	ObjectInputStream ois = null;    	try{    	  byte[] recdata = recipient.getContent(getCAToken().getPrivateKey(SecConst.CAKEYPURPOSE_KEYENCRYPT),getCAToken().getProvider());    	  ois = new ObjectInputStream(new ByteArrayInputStream(recdata));    	}catch(CATokenOfflineException e){    		setStatus(SecConst.CA_OFFLINE);    		throw e;    	}    	    	    	    	return (KeyPair) ois.readObject();      }