Steffen Jaeckel | 26dd993 | 2021-07-08 15:57:33 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* Copyright (C) 2020 Steffen Jaeckel <jaeckel-floss@eyet-services.de> */ |
| 3 | |
| 4 | /** |
| 5 | * Compare should with the processed passphrase. |
| 6 | * |
| 7 | * @should The crypt-style string to compare against |
| 8 | * @passphrase The plaintext passphrase |
| 9 | * @equal Pointer to an int where the result is stored |
| 10 | * '0' = unequal |
| 11 | * '1' = equal |
Steffen Jaeckel | 29bbe71 | 2021-07-08 15:57:34 +0200 | [diff] [blame] | 12 | * @return 0 on success, error code of errno else |
Steffen Jaeckel | 26dd993 | 2021-07-08 15:57:33 +0200 | [diff] [blame] | 13 | */ |
Steffen Jaeckel | 29bbe71 | 2021-07-08 15:57:34 +0200 | [diff] [blame] | 14 | int crypt_compare(const char *should, const char *passphrase, int *equal); |