add size check to fips core hash gen