diff --git a/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp b/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp --- a/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp +++ b/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp @@ -225,10 +225,6 @@ persist.account.size())) { throw std::runtime_error{"error restoreFromB64 => ::olm_unpickle_account"}; } - if (persist.account.size() != ::olm_pickle_account_length(this->account)) { - throw std::runtime_error{ - "error restoreFromB64 => ::olm_pickle_account_length"}; - } std::unordered_map::iterator it; for (it = persist.sessions.begin(); it != persist.sessions.end(); ++it) { diff --git a/native/cpp/CommonCpp/CryptoTools/Session.cpp b/native/cpp/CommonCpp/CryptoTools/Session.cpp --- a/native/cpp/CommonCpp/CryptoTools/Session.cpp +++ b/native/cpp/CommonCpp/CryptoTools/Session.cpp @@ -94,10 +94,6 @@ b64.size())) { throw std::runtime_error("error pickleSession => ::olm_unpickle_session"); } - if (b64.size() != ::olm_pickle_session_length(session->olmSession)) { - throw std::runtime_error( - "error pickleSession => ::olm_pickle_session_length"); - } return session; }