add function for getting sha2 implementation based on size
use sha function for looking up hash class