Blame crypt/crypt.h

Packit Service 82fcde
/*
Packit Service 82fcde
 * UFC-crypt: ultra fast crypt(3) implementation
Packit Service 82fcde
 *
Packit Service 82fcde
 * Copyright (C) 1991-2018 Free Software Foundation, Inc.
Packit Service 82fcde
 *
Packit Service 82fcde
 * The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
 * modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
 * License as published by the Free Software Foundation; either
Packit Service 82fcde
 * version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
 *
Packit Service 82fcde
 * The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
 * Lesser General Public License for more details.
Packit Service 82fcde
 *
Packit Service 82fcde
 * You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
 * License along with the GNU C Library; if not, see
Packit Service 82fcde
 * <http://www.gnu.org/licenses/>.
Packit Service 82fcde
 *
Packit Service 82fcde
 * @(#)crypt.h	1.5 12/20/96
Packit Service 82fcde
 *
Packit Service 82fcde
 */
Packit Service 82fcde
Packit Service 82fcde
#ifndef _CRYPT_H
Packit Service 82fcde
#define _CRYPT_H	1
Packit Service 82fcde
Packit Service 82fcde
#include <features.h>
Packit Service 82fcde
Packit Service 82fcde
__BEGIN_DECLS
Packit Service 82fcde
Packit Service 82fcde
/* One-way hash PHRASE, returning a string suitable for storage in the
Packit Service 82fcde
   user database.  SALT selects the one-way function to use, and
Packit Service 82fcde
   ensures that no two users' hashes are the same, even if they use
Packit Service 82fcde
   the same passphrase.  The return value points to static storage
Packit Service 82fcde
   which will be overwritten by the next call to crypt.  */
Packit Service 82fcde
extern char *crypt (const char *__phrase, const char *__salt)
Packit Service 82fcde
     __THROW __nonnull ((1, 2));
Packit Service 82fcde
Packit Service 82fcde
#ifdef __USE_GNU
Packit Service 82fcde
Packit Service 82fcde
/* This structure provides scratch and output buffers for 'crypt_r'.
Packit Service 82fcde
   Its contents should not be accessed directly.  */
Packit Service 82fcde
struct crypt_data
Packit Service 82fcde
  {
Packit Service 82fcde
    char keysched[16 * 8];
Packit Service 82fcde
    char sb0[32768];
Packit Service 82fcde
    char sb1[32768];
Packit Service 82fcde
    char sb2[32768];
Packit Service 82fcde
    char sb3[32768];
Packit Service 82fcde
    /* end-of-aligment-critical-data */
Packit Service 82fcde
    char crypt_3_buf[14];
Packit Service 82fcde
    char current_salt[2];
Packit Service 82fcde
    long int current_saltbits;
Packit Service 82fcde
    int  direction, initialized;
Packit Service 82fcde
  };
Packit Service 82fcde
Packit Service 82fcde
/* Thread-safe version of 'crypt'.
Packit Service 82fcde
   DATA must point to a 'struct crypt_data' allocated by the caller.
Packit Service 82fcde
   Before the first call to 'crypt_r' with a new 'struct crypt_data',
Packit Service 82fcde
   that object must be initialized to all zeroes.  The pointer
Packit Service 82fcde
   returned, if not NULL, will point within DATA.  (It will still be
Packit Service 82fcde
   overwritten by the next call to 'crypt_r' with the same DATA.)  */
Packit Service 82fcde
extern char *crypt_r (const char *__phrase, const char *__salt,
Packit Service 82fcde
		      struct crypt_data * __restrict __data)
Packit Service 82fcde
     __THROW __nonnull ((1, 2, 3));
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
__END_DECLS
Packit Service 82fcde
Packit Service 82fcde
#endif	/* crypt.h */