MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / encrypt

Method encrypt

mlspp/src/messages.cpp:158–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158void
159Welcome::encrypt(const KeyPackage& kp, const std::optional<bytes>& path_secret)
160{
161 auto gs = GroupSecrets{ _joiner_secret, std::nullopt, _psks };
162 if (path_secret) {
163 gs.path_secret = GroupSecrets::PathSecret{ opt::get(path_secret) };
164 }
165
166 auto gs_data = tls::marshal(gs);
167 auto enc_gs = kp.init_key.encrypt(
168 kp.cipher_suite, encrypt_label::welcome, encrypted_group_info, gs_data);
169 secrets.push_back({ kp.ref(), enc_gs });
170}
171
172GroupSecrets
173Welcome::decrypt_secrets(int kp_index, const HPKEPrivateKey& init_priv) const

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.80
getFunction · 0.50
marshalFunction · 0.50
refMethod · 0.45

Tested by

no test coverage detected