static int _keyslot_for_digest(struct luks2_hdr *hdr, int keyslot, int digest)
{
	int r = -EINVAL;

	r = LUKS2_digest_by_keyslot(hdr, keyslot);
	if (r < 0)
		return r;
	return r == digest ? 0 : -ENOENT;
}
static int _keyslot_for_digest(struct luks2_hdr *hdr, int keyslot, int digest)
{
	int r = -EINVAL;

	r = LUKS2_digest_by_keyslot(hdr, keyslot);
	if (r < 0)
		return r;
	return r == digest ? 0 : -ENOENT;
}