code: private void readKeyStore(Configuration conf) throws IOException, FormatNotUnderstoodException {
  	if ((this.hocr.getCryptKeystoreFile()!=null) && (!"".equals(this.hocr.getCryptKeystoreFile()))) {
  		LOG.info("Using keystore to obtain credentials instead of passwords");
  		HadoopKeyStoreManager hksm = new HadoopKeyStoreManager(conf);
  		try {
  			hksm.openKeyStore(new Path(this.hocr.getCryptKeystoreFile()), this.hocr.getCryptKeystoreType(), this.hocr.getCryptKeystorePassword());
  			String pw="";
  			if ((this.hocr.getCryptKeystoreAlias()!=null) && (!"".equals(this.hocr.getCryptKeystoreAlias()))) {
  				pw=hksm.getPassword(this.hocr.getCryptKeystoreAlias(), this.hocr.getCryptKeystorePassword());
  			} else {
  				pw=hksm.getPassword(this.hocr.getFileName(), this.hocr.getCryptKeystorePassword());
  			}
  			this.hocr.setPassword(pw);
  		} catch (NoSuchAlgorithmException | CertificateException | KeyStoreException | IllegalArgumentException | UnrecoverableEntryException | InvalidKeySpecException e) {
  			LOG.error("Cannopt read keystore. Exception: ",e);
  			throw new FormatNotUnderstoodException("Cannot read keystore to obtain credentials to access encrypted documents "+e);
  		}
  		
  	}
  }
docs: Reads the keystore to obtain credentials
  
  @param conf Configuration provided by the Hadoop environment
  @throws IOException
  @throws FormatNotUnderstoodException