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:
Ondrej Kozina
2021-02-10 17:48:56 +01:00
parent 7d912c7d3e
commit a4d7c46d80
5 changed files with 14 additions and 13 deletions

View File

@@ -23,6 +23,7 @@
#ifndef _UTILS_CRYPT_H
#define _UTILS_CRYPT_H
#include <stdbool.h>
#include <unistd.h>
#define MAX_CIPHER_LEN 32
@@ -38,4 +39,6 @@ int crypt_parse_pbkdf(const char *s, const char **pbkdf);
ssize_t crypt_hex_to_bytes(const char *hex, char **result, int safe_alloc);
bool crypt_is_cipher_null(const char *cipher_spec);
#endif /* _UTILS_CRYPT_H */