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

Method generate

mlspp/src/crypto.cpp:299–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299HPKEPrivateKey
300HPKEPrivateKey::generate(CipherSuite suite)
301{
302 auto priv = suite.hpke().kem.generate_key_pair();
303 auto priv_data = suite.hpke().kem.serialize_private(*priv);
304 auto pub = priv->public_key();
305 auto pub_data = suite.hpke().kem.serialize(*pub);
306 return { priv_data, pub_data };
307}
308
309HPKEPrivateKey
310HPKEPrivateKey::parse(CipherSuite suite, const bytes& data)

Callers

nothing calls this directly

Calls 4

generate_key_pairMethod · 0.45
serialize_privateMethod · 0.45
public_keyMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected