const char *crypt_get_integrity(struct crypt_device *cd)
{
	if (!cd)
		return NULL;

	if (isINTEGRITY(cd->type))
		return cd->u.integrity.params.integrity;

	if (isLUKS2(cd->type))
		return LUKS2_get_integrity(&cd->u.luks2.hdr, CRYPT_DEFAULT_SEGMENT);

	return NULL;
}
const char *crypt_get_integrity(struct crypt_device *cd)
{
	if (!cd)
		return NULL;

	if (isINTEGRITY(cd->type))
		return cd->u.integrity.params.integrity;

	if (isLUKS2(cd->type))
		return LUKS2_get_integrity(&cd->u.luks2.hdr, CRYPT_DEFAULT_SEGMENT);

	return NULL;
}