blob: 680ffe934999db68bea2859964750b02a45f98c4 [file] [log] [blame]
Steffen Jaeckel26dd9932021-07-08 15:57:33 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/* Copyright (C) 2020 Steffen Jaeckel <jaeckel-floss@eyet-services.de> */
3
4#include <linux/types.h>
5#include <vsprintf.h>
6
7#define NO_GENSALT
8#define CRYPT_OUTPUT_SIZE 384
9#define ALG_SPECIFIC_SIZE 8192
10
11#define ARG_UNUSED(x) (x)
12
13#define static_assert(a, b) _Static_assert(a, b)
14
15#define strtoul(cp, endp, base) simple_strtoul(cp, endp, base)
16
17extern const unsigned char ascii64[65];
18
19#define b64t ((const char *)ascii64)
20
21void crypt_sha256crypt_rn(const char *phrase, size_t phr_size,
22 const char *setting, size_t ARG_UNUSED(set_size),
23 uint8_t *output, size_t out_size, void *scratch,
24 size_t scr_size);
25void crypt_sha512crypt_rn(const char *phrase, size_t phr_size,
26 const char *setting, size_t ARG_UNUSED(set_size),
27 uint8_t *output, size_t out_size, void *scratch,
28 size_t scr_size);