From a0714516014efb0494c3692a280ddbadfc648157 Mon Sep 17 00:00:00 2001 From: Hlib Yarovyi Date: Mon, 12 Jul 2021 17:03:05 +0200 Subject: [PATCH 1/2] Delete some func Signed-off-by: Hlib Yarovyi --- src/libcert_crypto.cc | 15 --------------- 1 file changed, 15 deletions(-) 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 From 602260bc12d0281790f045c5e1c31c3d141ad5bc Mon Sep 17 00:00:00 2001 From: Hlib Yarovyi Date: Mon, 12 Jul 2021 17:04:41 +0200 Subject: [PATCH 2/2] Delete from header Signed-off-by: Hlib Yarovyi --- public_include/libcert_crypto.h | 14 -------------- 1 file changed, 14 deletions(-) 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