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

Function PositiveMultiply

src/cryptlib/integer.cpp:1827–1837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1825}
1826
1827void PositiveMultiply(Integer &product, const Integer &a, const Integer &b)
1828{
1829 unsigned aSize = RoundupSize(a.WordCount());
1830 unsigned bSize = RoundupSize(b.WordCount());
1831
1832 product.reg.CleanNew(RoundupSize(aSize+bSize));
1833 product.sign = Integer::POSITIVE;
1834
1835 SecWordBlock workspace(aSize + bSize);
1836 AsymmetricMultiply(product.reg, workspace, a.reg, aSize, b.reg, bSize);
1837}
1838
1839void Multiply(Integer &product, const Integer &a, const Integer &b)
1840{

Callers 1

MultiplyFunction · 0.85

Calls 4

RoundupSizeFunction · 0.85
AsymmetricMultiplyFunction · 0.85
WordCountMethod · 0.80
CleanNewMethod · 0.80

Tested by

no test coverage detected