I was able to get Digest::SHA working but it's returning gibberish. I'm not sure why. $data1 and $data2 are byte strings in hex. There is no '0x' preceeding the byte strings.
$digest = sha256_hex($data1 . $data2);
$digest2 = sha256($data1 . $data2);
With '$digest' I get a valid result, but with 'digest2' I get gibberish.
print "This is a hexdigest->" . $digest, "\n";
print "This is a digest->" . $digest2, "\n";
This is a digest->��j6��Uϕ�&#
What did I do wrong?