mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Move cipher_null check in internal function crypt_is_cipher_null.
Also removes tools helper so that we keep check in one place.
This commit is contained in:
@@ -175,3 +175,10 @@ ssize_t crypt_hex_to_bytes(const char *hex, char **result, int safe_alloc)
|
||||
*result = bytes;
|
||||
return i;
|
||||
}
|
||||
|
||||
bool crypt_is_cipher_null(const char *cipher_spec)
|
||||
{
|
||||
if (!cipher_spec)
|
||||
return false;
|
||||
return (strstr(cipher_spec, "cipher_null") || !strcmp(cipher_spec, "null"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user