MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / remove_key

Method remove_key

runners/key-manager/KeyManagerRunner.cpp:326–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326void KeyManagerRunner::remove_key(td::Bits256 public_key) {
327 for (auto it = private_keys_.begin(); it != private_keys_.end(); it++) {
328 if ((*it)->public_key == public_key) {
329 kv_->erase(PSTRING() << "key_" << (*it)->public_key.to_hex());
330 private_keys_.erase(it);
331 return;
332 }
333 }
334}
335
336void KeyManagerRunner::add_static_private_key() {
337 auto P = std::make_unique<PrivateKey>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected