source: branches/samba-3.0/source/tests/crypttest.c@ 518

Last change on this file since 518 was 1, checked in by Paul Smedley, 19 years ago

Initial code import

File size: 23.3 KB
Line 
1#if defined(HAVE_UNISTD_H)
2#include <unistd.h>
3#endif
4
5#include <sys/types.h>
6
7#ifdef HAVE_STRING_H
8#include <string.h>
9#endif
10
11#ifdef HAVE_STRINGS_H
12#include <strings.h>
13#endif
14
15#if !defined(HAVE_CRYPT)
16
17/*
18 This bit of code was derived from the UFC-crypt package which
19 carries the following copyright
20
21 Modified for use by Samba by Andrew Tridgell, October 1994
22
23 Note that this routine is only faster on some machines. Under Linux 1.1.51
24 libc 4.5.26 I actually found this routine to be slightly slower.
25
26 Under SunOS I found a huge speedup by using these routines
27 (a factor of 20 or so)
28
29 Warning: I've had a report from Steve Kennedy <[email protected]>
30 that this crypt routine may sometimes get the wrong answer. Only
31 use UFC_CRYT if you really need it.
32
33*/
34
35/*
36 * UFC-crypt: ultra fast crypt(3) implementation
37 *
38 * Copyright (C) 1991-1998, Free Software Foundation, Inc.
39 *
40 * This library is free software; you can redistribute it and/or
41 * modify it under the terms of the GNU Library General Public
42 * License as published by the Free Software Foundation; either
43 * version 2 of the License, or (at your option) any later version.
44 *
45 * This library is distributed in the hope that it will be useful,
46 * but WITHOUT ANY WARRANTY; without even the implied warranty of
47 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
48 * Library General Public License for more details.
49 *
50 * You should have received a copy of the GNU Library General Public
51 * License along with this library; if not, write to the Free
52 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
53 *
54 * @(#)crypt_util.c 2.31 02/08/92