Convert PHP to Ruby
strtoupper(hash("sha512", $HashData)) // PHP
Digest::SHA512.hexdigest(hashData).upcase # Ruby
digest: Ruby Standard Library Documentation
Digest
OpenSSL::Digest
Ruby MD5 and SHA1 Digest Benchmark