Updated SHA2 main method