diff options
Diffstat (limited to 'src/sha.erl')
-rw-r--r-- | src/sha.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sha.erl b/src/sha.erl index 64c15c166..06dd3c2d1 100644 --- a/src/sha.erl +++ b/src/sha.erl @@ -28,7 +28,11 @@ -author('alexey@process-one.net'). -export([start/0, sha/1, sha1/1, sha224/1, sha256/1, sha384/1, - sha512/1, md2/1]). + sha512/1]). + +-ifdef(HAVE_MD2). +-export([md2/1]). +-endif. -include("ejabberd.hrl"). @@ -80,8 +84,10 @@ sha384(Text) -> sha512(Text) -> erlang:port_control(?DRIVER, 512, Text). +-ifdef(HAVE_MD2). md2(Text) -> erlang:port_control(?DRIVER, 2, Text). +-endif. driver_path() -> Suffix = case os:type() of |