@Override
	public Response info(InfoRequest request) throws IOException {
		Mac hmac=null;
		try {
			hmac = Mac.getInstance("HmacSHA256");
		} catch (NoSuchAlgorithmException e) {
			System.err.println("NoSuchAlgorithmException (HmacSHA256 not valid): " + e.getMessage());
			return new HmacErrorResponse("Integrity check failed.");
		} 
		try {
			hmac.init(secretKey);
		} catch (InvalidKeyException e) {
			System.err.println("InvalidKeyException: " + e.getMessage());
			return new HmacErrorResponse("Integrity check failed.");
		}
	
		hmac.update(request.toString().getBytes());
		
		byte[] computedHash = hmac.doFinal();
		boolean validHash = false;
		if(request.getKey()!=null){
			byte[] receivedHash = Base64.decode(request.getKey());
			validHash = MessageDigest.isEqual(computedHash,receivedHash);
		}
		if(validHash){
			byte[] data = FileUtils.readFile(dir,request.getFilename());
			if(data == null) return new MessageResponse("File does not exist!");
			else {
				return new InfoResponse(request.getFilename(),data.length);
			}
		} else {
			shell.writeLine(request.toString());
			return new HmacErrorResponse("Integrity check failed in info Request.");
		}
	}