usr/src/grub/grub-0.97/stage2/md5.h
author William Kucharski <William.Kucharski@Sun.COM>
Fri, 07 Nov 2008 21:36:41 -0700
changeset 8044 b3af80bbf173
parent 0 usr/src/grub/grub-0.95/stage2/md5.h@68f95e015346
permissions -rw-r--r--
6731552 GRUB should have the ability to overlay a logo on the graphical splash screen 6762035 GRUB needs to understand new ext3 256 Byte inodes 6762243 GRUB should be updated to version 0.97

/* md5.h - an implementation of the MD5 algorithm and MD5 crypt */
/*
 *  GRUB  --  GRand Unified Bootloader
 *  Copyright (C) 2000  Free Software Foundation, Inc.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/* If CHECK is true, check a password for correctness. Returns 0
   if password was correct, and a value != 0 for error, similarly
   to strcmp.
   If CHECK is false, crypt KEY and save the result in CRYPTED.
   CRYPTED must have a salt.  */
extern int md5_password (const char *key, char *crypted, int check);

/* For convenience.  */
#define check_md5_password(key,crypted)	md5_password((key), (crypted), 1)
#define make_md5_password(key,crypted)	md5_password((key), (crypted), 0)