1 /* $OpenBSD: crypt.c,v 1.30 2015/07/18 01:18:50 jeremy Exp $ */ 2 3 #include <errno.h> 4 #include <pwd.h> 5 6 char * 7 crypt(const char *key, const char *setting) 8 { 9 if (setting[0] == '$') { 10 switch (setting[1]) { 11 case '2': 12 return bcrypt(key, setting); 13 default: 14 errno = EINVAL; 15 return (NULL); 16 } 17 } 18 errno = EINVAL; 19 return (NULL); 20 } 21