Created
May 13, 2021 23:24
-
-
Save dx7/db894276c13f62d961457cd00a2dd5ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Base16 | |
def self.strict_encode16(s) | |
s.unpack1('H*') | |
end | |
def self.strict_decode16(s) | |
[s].pack('H*') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment