2018-03-14 19:04:41 +01:00
|
|
|
//
|
2022-12-31 22:28:08 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
|
2018-03-14 19:04:41 +01:00
|
|
|
//
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
//
|
2018-07-03 21:29:04 +02:00
|
|
|
#pragma once
|
|
|
|
|
2018-03-14 19:04:41 +01:00
|
|
|
#include "td/telegram/AuthManager.h"
|
2021-10-27 16:32:09 +02:00
|
|
|
|
2018-03-14 19:04:41 +01:00
|
|
|
#include "td/utils/tl_helpers.h"
|
|
|
|
|
|
|
|
namespace td {
|
2018-06-07 20:42:17 +02:00
|
|
|
|
2019-02-21 18:54:20 +01:00
|
|
|
template <class StorerT>
|
|
|
|
void AuthManager::WaitPasswordState::store(StorerT &storer) const {
|
2018-03-15 11:06:26 +01:00
|
|
|
using td::store;
|
2018-08-04 08:55:49 +02:00
|
|
|
store(current_client_salt_, storer);
|
|
|
|
store(current_server_salt_, storer);
|
2018-08-10 15:22:48 +02:00
|
|
|
store(srp_g_, storer);
|
|
|
|
store(srp_p_, storer);
|
|
|
|
store(srp_B_, storer);
|
|
|
|
store(srp_id_, storer);
|
2018-03-15 11:06:26 +01:00
|
|
|
store(hint_, storer);
|
|
|
|
store(has_recovery_, storer);
|
|
|
|
store(email_address_pattern_, storer);
|
2023-02-22 13:59:36 +01:00
|
|
|
store(has_secure_values_, storer);
|
2018-03-15 11:06:26 +01:00
|
|
|
}
|
|
|
|
|
2019-02-21 18:54:20 +01:00
|
|
|
template <class ParserT>
|
|
|
|
void AuthManager::WaitPasswordState::parse(ParserT &parser) {
|
2018-03-15 11:06:26 +01:00
|
|
|
using td::parse;
|
2018-08-04 08:55:49 +02:00
|
|
|
parse(current_client_salt_, parser);
|
|
|
|
parse(current_server_salt_, parser);
|
2018-08-10 15:22:48 +02:00
|
|
|
parse(srp_g_, parser);
|
|
|
|
parse(srp_p_, parser);
|
|
|
|
parse(srp_B_, parser);
|
|
|
|
parse(srp_id_, parser);
|
2018-03-15 11:06:26 +01:00
|
|
|
parse(hint_, parser);
|
|
|
|
parse(has_recovery_, parser);
|
|
|
|
parse(email_address_pattern_, parser);
|
2023-02-22 13:59:36 +01:00
|
|
|
parse(has_secure_values_, parser);
|
2018-03-15 11:06:26 +01:00
|
|
|
}
|
2018-03-14 19:04:41 +01:00
|
|
|
|
|
|
|
} // namespace td
|