diff options
author | Matthias Radestock <matthias@lshift.net> | 2009-10-26 12:58:48 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2009-10-26 12:58:48 +0000 |
commit | c3b1d522d1a211a3134928404d482501310ac4f1 (patch) | |
tree | d7ec35bc6cdaa7073a2f8b64b87727be358e906e /src/rabbit_guid.erl | |
parent | 3ed2a437a10a7ecd4b1e476180d8872bc0783e52 (diff) | |
download | rabbitmq-server-c3b1d522d1a211a3134928404d482501310ac4f1.tar.gz |
use base64 module instead of ssl_base64
The former is part of stdlib and hencd available in all Erlang
installations, whereas the latter is absent if ssl was disabled during
compilation.
The downside is that base64 was only introduced in R11B-4. However,
all the major distributions ship stable branches with Erlang releases
later than that, and for exotic distributions the user can always
build Erlang manually.
Diffstat (limited to 'src/rabbit_guid.erl')
-rw-r--r-- | src/rabbit_guid.erl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/rabbit_guid.erl b/src/rabbit_guid.erl index b789fbd1..ea61a679 100644 --- a/src/rabbit_guid.erl +++ b/src/rabbit_guid.erl @@ -104,13 +104,8 @@ guid() -> %% generate a readable string representation of a guid. Note that any %% monotonicity of the guid is not preserved in the encoding. string_guid(Prefix) -> - %% we use the (undocumented) ssl_base64 module here because it is - %% present throughout OTP R11 and R12 whereas base64 only becomes - %% available in R11B-4. - %% - %% TODO: once debian stable and EPEL have moved from R11B-2 to - %% R11B-4 or later we should change this to use base64. - Prefix ++ "-" ++ ssl_base64:encode(erlang:md5(term_to_binary(guid()))). + Prefix ++ "-" ++ base64:encode_to_string( + erlang:md5(term_to_binary(guid()))). binstring_guid(Prefix) -> list_to_binary(string_guid(Prefix)). |