Distance between the cylinder and its axis intersection point with a cube

I’ve some cylinders under a large cube.
for each cylinder, I wanna computes distance from cylinder center to its axis intersection point with the cube.
Is it possible?

http://wiki.unity3d.com/index.php/3d_Math_functions
cylinder center is just a line
you probably want line plane intersection, using one face of the cube as plane

or just raycast against cube colliders