diff --git a/public_include/libcert_crypto.h b/public_include/libcert_crypto.h index 76ac0f5..9981e80 100644 --- a/public_include/libcert_crypto.h +++ b/public_include/libcert_crypto.h @@ -39,18 +39,4 @@ std::string encrypt(const std::string& plainData, const std::string& passphrase) */ std::string decrypt(const std::string& encryptedData, const std::string& passphrase); -/** - * Check pass phraseFormat - * @param phassphrase - * @return True if the passphrase is Ok, otherwise false. - */ -bool checkPassphraseFormat(const std::string& passphrase); - -/** - * Get passphrase format - * @param phassphrase - * @return The passphrase format - */ -std::string getPassphraseFormat(); - } // namespace fty diff --git a/src/libcert_crypto.cc b/src/libcert_crypto.cc index 471c29f..ecc4517 100644 --- a/src/libcert_crypto.cc +++ b/src/libcert_crypto.cc @@ -28,9 +28,6 @@ #include "libcert_openssl_wrapper.h" #include -#include -#include -#include namespace fty { static constexpr const char* PASS_PHRASE_FORMAT_REGEX = ".{8,}"; @@ -78,16 +75,4 @@ std::string decrypt(const std::string& encryptedData, const std::string& passphr return bytesToStr(plainBinary); } -bool checkPassphraseFormat(const std::string& passphrase) -{ - std::regex reg(PASS_PHRASE_FORMAT_REGEX); - - return !passphrase.empty() && std::regex_search(passphrase, reg); -} - -std::string getPassphraseFormat() -{ - return std::string(PASS_PHRASE_FORMAT_REGEX); -} - } // namespace fty