code: @Override
  	public Key engineGetKey(String s, char[] chars)
  			throws NoSuchAlgorithmException, UnrecoverableKeyException {
  
  		CredentialWrapper credential = getKeyEntry(s);
  		Key key = null;
  		if (credential != null) {
  			try {
  				String password = null;
  				if (chars != null) {
  					password = new String(chars);
  				}
  				key = credential.getCredential().getPrivateKey(password);
  			} catch (ResourceStoreException e) {
  				throw new UnrecoverableKeyException(e.getMessage());
  			} catch (CredentialException e) {
  				throw new UnrecoverableKeyException(e.getMessage());
  			}
  		}
  		return key;
  	}
docs: Get the key referenced by the specified alias.
  
  @param s
  The key's alias.
  @param chars
  The key's password.
  @return The key reference by the alias or null.
  @throws NoSuchAlgorithmException
  If the key is encoded with an invalid algorithm.
  @throws UnrecoverableKeyException
  If the key can not be retrieved.