MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / GeneratePrivate

Method GeneratePrivate

extra/yassl/taocrypt/src/dh.cpp:55–60  ·  view source on GitHub ↗

Generate private value

Source from the content-addressed store, hash-verified

53
54// Generate private value
55void DH::GeneratePrivate(RandomNumberGenerator& rng, byte* priv)
56{
57 Integer x(rng, Integer::One(), min(p_ - 1,
58 Integer::Power2(2*DiscreteLogWorkFactor(p_.BitCount())) ) );
59 x.Encode(priv, p_.ByteCount());
60}
61
62
63// Generate public value

Callers

nothing calls this directly

Calls 3

minFunction · 0.85
DiscreteLogWorkFactorFunction · 0.85
EncodeMethod · 0.80

Tested by

no test coverage detected