1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-25 21:42:33 +03:00
Bruce Momjian f7a3d742df Clearify variables names so it is clear which variable is the
client-supplied password and which is from pg_shadow.
2002-12-05 18:52:43 +00:00

35 lines
1.0 KiB
C

/*-------------------------------------------------------------------------
*
* crypt.h
* Interface to libpq/crypt.c
*
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: crypt.h,v 1.24 2002/12/05 18:52:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PG_CRYPT_H
#define PG_CRYPT_H
#include "libpq/libpq-be.h"
/* Also defined in interfaces/odbc/md5.h */
#define MD5_PASSWD_LEN 35
#define isMD5(passwd) (strncmp((passwd),"md5",3) == 0 && \
strlen(passwd) == MD5_PASSWD_LEN)
extern int md5_crypt_verify(const Port *port, const char *user,
char *client_pass);
extern bool md5_hash(const void *buff, size_t len, char *hexsum);
extern bool CheckMD5Pwd(char *passwd, char *storedpwd, char *seed);
/* Also defined in interfaces/odbc/md5.h */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif