mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:07:35 +00:00
LibC: Move crypt() and crypt_r() to the right header file
According to POSIX.1 these should be in <crypt.h>.
This commit is contained in:
parent
f05086a5d2
commit
ce77caf479
6 changed files with 35 additions and 9 deletions
|
@ -6,8 +6,9 @@
|
|||
#include <AK/Base64.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibCrypto/Hash/SHA2.h>
|
||||
#include <crypt.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
|
28
Userland/Libraries/LibCrypt/crypt.h
Normal file
28
Userland/Libraries/LibCrypt/crypt.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
/* standard symbolic constants and types
|
||||
*
|
||||
* values from POSIX standard unix specification
|
||||
*
|
||||
* https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
struct crypt_data {
|
||||
int initialized;
|
||||
char result[65];
|
||||
};
|
||||
|
||||
char* crypt(const char* key, const char* salt);
|
||||
char* crypt_r(const char* key, const char* salt, struct crypt_data* data);
|
||||
|
||||
__END_DECLS
|
Loading…
Add table
Add a link
Reference in a new issue