OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [test/] [crypt/] [md5c-test.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
#include <stdlib.h>
2
#include <stdio.h>
3
#include <string.h>
4
#include <crypt.h>
5
 
6
int
7
main (int argc, char *argv[])
8
{
9
  const char salt[] = "$1$saltstring";
10
  char *cp;
11
 
12
  cp = crypt ("Hello world!", salt);
13
  if (strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp)) {
14
      fprintf(stderr, "Failed md5 crypt test!\n");
15
      return EXIT_FAILURE;
16
  }
17
  fprintf(stderr, "Passed md5 crypt test!\n");
18
  return EXIT_SUCCESS;
19
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.