mirror of
https://xff.cz/git/u-boot/
synced 2025-10-21 01:51:11 +02:00
lib: add crypt subsystem
Add the basic functionality required to support the standard crypt format. The files crypt-sha256.c and crypt-sha512.c originate from libxcrypt and their formatting is therefor retained. The integration is done via a crypt_compare() function in crypt.c. ``` libxcrypt $ git describe --long --always --all tags/v4.4.17-0-g6b110bc ``` Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
committed by
Tom Rini
parent
c74675bd90
commit
26dd993657
13
include/crypt.h
Normal file
13
include/crypt.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/* Copyright (C) 2020 Steffen Jaeckel <jaeckel-floss@eyet-services.de> */
|
||||
|
||||
/**
|
||||
* Compare should with the processed passphrase.
|
||||
*
|
||||
* @should The crypt-style string to compare against
|
||||
* @passphrase The plaintext passphrase
|
||||
* @equal Pointer to an int where the result is stored
|
||||
* '0' = unequal
|
||||
* '1' = equal
|
||||
*/
|
||||
void crypt_compare(const char *should, const char *passphrase, int *equal);
|
Reference in New Issue
Block a user