Yes, but there is a much easier way to detect the phase difference. Use an XOR logic gate and feed the signals to its two inputs. The logic of XOR says the output will be high only if one or the other, but not both are high. So the output is actually the phase difference between the inputs represented as a pulse width. Follow it with a simple RC filter and you get a voltage between 0V and 5V (or whatever logic supply you use) which is proportional to the phase difference. Half supply means 90 degrees.
The other method if you have an oscilloscope is to connect one signal to the X input and the other to the Y input. Put the scope in XY display mode and you get a loop on the display. The phase difference is demonstrated as the difference in height and width of the loop, when you have a circle they are the same so you have exactly 90 degrees shift. You essentially are showing sine and cosine plotted against each other and mathematically they are 90 degrees apart.
Brian.