summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCrypt/crypt.h
blob: 0a304ac0475ac9e5b42b637f89cb8194a4fb3248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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(char const* key, char const* salt);
char* crypt_r(char const* key, char const* salt, struct crypt_data* data);

__END_DECLS