summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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, []).