Skip to content

Instantly share code, notes, and snippets.

@zenparsing
Created May 18, 2020 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zenparsing/9cad96080e41d427ec40cb27cec9c7fb to your computer and use it in GitHub Desktop.
Save zenparsing/9cad96080e41d427ec40cb27cec9c7fb to your computer and use it in GitHub Desktop.
Hex to sorted raw encoding in Ruby
hex_values = ['626f6f74', '72616365', '626c6168', '6f6f7073']
packed_list = hex_values.map { |item| [item].pack('H*') }.sort().join()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment