MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / Sign

Method Sign

src/cryptlib/elgamal.cpp:290–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290void ElGamalSigPrivateKey::Sign(RandomNumberGenerator &rng, const byte *message, unsigned int messageLen, byte *signature)
291{
292 assert(messageLen <= MaxMessageLength());
293
294 Integer m(message, messageLen);
295 Integer r;
296 Integer s;
297
298 RawSign(rng, m, r, s);
299 r.Encode(signature, qLen);
300 s.Encode(signature+qLen, qLen);
301}
302
303void ElGamalSigPrivateKey::RawSign(RandomNumberGenerator &rng, const Integer &m, Integer &r, Integer &s) const
304{

Callers 1

ProcessBlockMethod · 0.80

Calls 1

EncodeMethod · 0.45

Tested by

no test coverage detected