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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [linux/] [uClibc/] [test/] [crypt/] [md5c-test.c] - Rev 1782

Compare with Previous | Blame | View Log

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <crypt.h>
 
int
main (int argc, char *argv[])
{
  const char salt[] = "$1$saltstring";
  char *cp;
 
  cp = crypt ("Hello world!", salt);
  if (strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp)) { 
      fprintf(stderr, "Failed md5 crypt test!\n");
      return EXIT_FAILURE;
  }
  fprintf(stderr, "Passed md5 crypt test!\n");
  return EXIT_SUCCESS;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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