updated LegacyShaComposer to allow choice of sha algorithm