public static byte[] byteArrayAnd(byte[] mask, byte[] bytes) {
		byte[] result = new byte[bytes.length];

		if (mask.length != bytes.length) {
			throw new IllegalArgumentException("inappropriate mask");
		}

		for (int i = 0; i < bytes.length; i++) {
			result[i] = (byte) (mask[i] & bytes[i]);
		}
		return result;
	}
Performs a bitwise AND on the given arrays.

@param mask
@param bytes
@return
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/util/InstructionSearchUtils.java