Skip to content

Instantly share code, notes, and snippets.

@icostan
Created October 11, 2018 18:04
Show Gist options
  • Save icostan/2d9302e5f6493639d0cfe0794fda93d2 to your computer and use it in GitHub Desktop.
Save icostan/2d9302e5f6493639d0cfe0794fda93d2 to your computer and use it in GitHub Desktop.
ruby> checksum = Digest::SHA256.hexdigest(Digest::SHA256.digest([with_version].pack('H*')))[0, 8]
=> "c7f18fe8"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment