summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-03-07 22:38:45 +0100
committerMagnus Ahltorp <map@kth.se>2015-03-07 22:38:45 +0100
commit23a64bf71e063a548f59d4699c16f79a570339d4 (patch)
treed199f96f2725ca1d98267068c9cdcad2715a08bc /src
parentb596a11a745f6ae4e8fb4dc1440b7457ca7bd40a (diff)
Use mochihex instead of our own hex conversion
Diffstat (limited to 'src')
-rw-r--r--src/hex.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/hex.erl b/src/hex.erl
index 1eb1e6a..8e70826 100644
--- a/src/hex.erl
+++ b/src/hex.erl
@@ -6,8 +6,7 @@
-spec bin_to_hexstr(binary()) -> string().
bin_to_hexstr(Bin) ->
- lists:flatten([io_lib:format("~2.16.0B", [X]) ||
- X <- binary_to_list(Bin)]).
+ mochihex:to_hex(Bin).
hexstr_to_bin(S) ->
hexstr_to_bin(S, []).