Assuming the hub is symmetrical, meaning that each flange is the same distance from the centerline of the hub, yes.
Use a spoke length calculator such as the one linked below to enter the info relevant to your hub, desired lacing pattern, and rim to find to figure out what you'll need. I'd suggest using a few different calculators to make sure everything adds up correctly.
http://www.sheldonbrown.com/rinard/spocalc.htm
You'll need to find specs (or measure) the ERD (effective rim diameter) of the rim you have as well the diameter of each flange and its distance from the center of the hub. And obviously the number of spokes and lacing pattern. This info should be available from the manufacturer of the rim and hub. If you're relacing to an existing hub and you're not sure of the model, you'll need to carefully measure. Details on this can be found on Sheldon's site.
Again, good luck!