public boolean validate(byte[] piece_hashes, byte[] piece, int piece_index){
		//Make sure we don't get an index out of bounds error
		if(piece_index != piece_hashes.length)
			return false;
		
		byte[] hashed_piece;
		MessageDigest create_hash = null;
		//The MessageDigest will use the SHA algorithm to create the hash of our pieces
		try {
			create_hash = MessageDigest.getInstance("SHA");
		} catch (NoSuchAlgorithmException e) {
			System.err.println("The Digester has a tummy ache.");
			e.printStackTrace();
		}
		hashed_piece = create_hash.digest(piece);
		
		//Still checking for index out of bounds errors
		if(piece_hashes.length != hashed_piece.length)
			return false;
		
		for(int i = 0; i<piece_hashes.length;i++)
			if(piece_hashes[i] != hashed_piece[i])
				return false;
		
		return true;
	}