blob: 3301f3b7697416f57cd2b39cf07aa3218d9c6e46 [file] [log] [blame]
Steffen Jaeckel229bd512021-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/**
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
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010012 * Return: 0 on success, error code of errno else
Steffen Jaeckel229bd512021-07-08 15:57:33 +020013 */
Steffen Jaeckel878c91b2021-07-08 15:57:34 +020014int crypt_compare(const char *should, const char *passphrase, int *equal);