Modify CPU sha256 function to take in length as an argument rather than use strlen