Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Compile on Mac OS X. Supports DES only.

Seriously. man 3 crypt.
  • Loading branch information...
commit b311d6ebfa45ef7608c159e4a5959f86b582c2fe 1 parent b9247fa
Michael Santos authored

Showing 2 changed files with 14 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 5 Makefile
  2. +8 1 README
11 Makefile
@@ -5,14 +5,15 @@ APP=crypt
5 5 CC=gcc
6 6
7 7 #Mac OS X: use "-m64" for a 64-bit erlang
8   -#ARCH=-m32
9   -#FLAGS=$(ARCH) -O3 -fPIC -bundle -flat_namespace -undefined suppress -fno-common -lcrypt
  8 +ARCH=-m32
  9 +
  10 +# By default, use the system crypt(3), which is DES only
  11 +FLAGS=$(ARCH) -O3 -fPIC -bundle -flat_namespace -undefined suppress -fno-common
10 12
11 13 # Linux
12   -FLAGS=-fPIC -shared -lcrypt
  14 +#FLAGS=-fPIC -shared -lcrypt
13 15
14   -#ERL_ROOT=/usr/local/lib/erlang
15   -ERL_ROOT=/media/opt/local/lib/erlang
  16 +ERL_ROOT=/usr/local/lib/erlang
16 17 CFLAGS=-g -Wall
17 18
18 19
9 README
@@ -10,16 +10,23 @@ Eshell V5.7.4 (abort with ^G)
10 10 "$6$aaaaaaaa$HREHv6TuSmUS/7spCDO5Js3ssSZ6.iwVkUoVtatJUhJDKVmERrRKBTolrPMub2s5dX6IEjZg6d6wZzFRlidV41"
11 11 4>
12 12
  13 +Which algorithms are supported by crypt are dependent on the system
  14 +crypt(3) library. For example, Mac OS X only supports DES (booooooo!!!!).
  15 +
13 16
14 17 TODO
15 18
16 19 1. What is the maximum password and salt length?
17 20
18 21 There doesn't appear to be a limit. DES has an 8 character limit and
19   -MD5 has a 255 character limit, but for the other types, no idea.
  22 +MD5 has a 256 character limit, but for the other types, no idea.
20 23
21 24 sysconf(_SC_PASS_MAX) seems to return the limit on Solaris, but isn't
22 25 available on Ubuntu.
23 26
24 27 2. Provide an erlang version of the crypt() interface.
25 28
  29 +3. For systems that don't support MD5, maybe use openssl (see in
  30 +openssl dist: apps/passwd.c).
  31 +
  32 +

0 comments on commit b311d6e

Please sign in to comment.
Something went wrong with that request. Please try again.