diff options
| author | Tom Rini <trini@konsulko.com> | 2021-07-23 14:50:43 -0400 | 
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2021-07-23 14:50:43 -0400 | 
| commit | edecc15eb9593b94dcd6a5f4f5ea5f134125b6a0 (patch) | |
| tree | 1c8f414dc7ae2d0e914a706e3dd8aaebb945c946 /lib/crypt/crypt-port.h | |
| parent | f534d93cbf34f1d1762b04eb5680e84bef5e1fe1 (diff) | |
| parent | 25c8b9f298e46ea6048b5308f7ee207c6461c36a (diff) | |
Merge branch '2021-07-23-reboot-mode-and-cryptfs-passwd-support'
- A new driver uclass is created to handle the reboot mode control.
- Add support for libcrypt-style passwords for autoboot
Diffstat (limited to 'lib/crypt/crypt-port.h')
| -rw-r--r-- | lib/crypt/crypt-port.h | 30 | 
1 files changed, 30 insertions, 0 deletions
| diff --git a/lib/crypt/crypt-port.h b/lib/crypt/crypt-port.h new file mode 100644 index 00000000000..6b9542d75bc --- /dev/null +++ b/lib/crypt/crypt-port.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (C) 2020 Steffen Jaeckel <jaeckel-floss@eyet-services.de> */ + +#include <linux/types.h> +#include <vsprintf.h> + +#define NO_GENSALT +#define CRYPT_OUTPUT_SIZE 384 +#define ALG_SPECIFIC_SIZE 8192 + +#define ARG_UNUSED(x) (x) + +#define static_assert(a, b) _Static_assert(a, b) + +#define strtoul(cp, endp, base) simple_strtoul(cp, endp, base) + +extern const unsigned char ascii64[65]; + +#define b64t ((const char *)ascii64) + +int crypt_sha256crypt_rn_wrapped(const char *phrase, size_t phr_size, +				 const char *setting, +				 size_t ARG_UNUSED(set_size), uint8_t *output, +				 size_t out_size, void *scratch, +				 size_t scr_size); +int crypt_sha512crypt_rn_wrapped(const char *phrase, size_t phr_size, +				 const char *setting, +				 size_t ARG_UNUSED(set_size), uint8_t *output, +				 size_t out_size, void *scratch, +				 size_t scr_size); | 
