Skip to content
Snippets Groups Projects
Verified Commit 7194b4f0 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Use uint64_t for rotation periods

parent b1b1ef9a
No related branches found
No related tags found
No related merge requests found
Pipeline #887 passed
......@@ -23,10 +23,10 @@ struct Encryption
std::string algorithm = "m.megolm.v1.aes-sha2";
//! How long the session should be used before changing it. 604800000 (a week) is the
//! recommended default.
int rotation_period_ms = 604800000;
uint64_t rotation_period_ms = 604800000;
//! How many messages should be sent before changing the session. 100 is the recommended
//! default.
int rotation_period_msgs = 100;
uint64_t rotation_period_msgs = 100;
};
void
......
......@@ -12,9 +12,9 @@ from_json(const nlohmann::json &obj, Encryption &encryption)
encryption.algorithm = obj.at("algorithm").get<std::string>();
if (obj.contains("rotation_period_ms"))
encryption.rotation_period_ms = obj.at("rotation_period_ms").get<int>();
encryption.rotation_period_ms = obj.at("rotation_period_ms").get<uint64_t>();
if (obj.contains("rotation_period_msgs"))
encryption.rotation_period_msgs = obj.at("rotation_period_msgs").get<int>();
encryption.rotation_period_msgs = obj.at("rotation_period_msgs").get<uint64_t>();
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment