summaryrefslogtreecommitdiff
path: root/crypt/md5c-test.c
blob: c80e40202d5044eb3b69f2ec81b9eb04eac50d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <crypt.h>
#include <string.h>

int
main (int argc, char *argv[])
{
  const char salt[] = "$1$saltstring";
  char *cp;
  int result = 0;

  cp = crypt ("Hello world!", salt);

  /* MD5 is disabled in FIPS mode.  */
  if (cp)
    result |= strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp);

  return result;
}