diff --git a/c/qrcodegen.c b/c/qrcodegen.c index 08a9387..5bf50c2 100644 --- a/c/qrcodegen.c +++ b/c/qrcodegen.c @@ -462,7 +462,8 @@ testable void calcReedSolomonRemainder(const uint8_t data[], int dataLen, const } -// Returns the product of the two given field elements modulo GF(2^8/0x11D). All argument values are valid. +// Returns the product of the two given field elements modulo GF(2^8/0x11D). +// All inputs are valid. This could be implemented as a 256*256 lookup table. testable uint8_t finiteFieldMultiply(uint8_t x, uint8_t y) { // Russian peasant multiplication uint8_t z = 0; diff --git a/cpp/QrCode.hpp b/cpp/QrCode.hpp index cc891e3..23a47b2 100644 --- a/cpp/QrCode.hpp +++ b/cpp/QrCode.hpp @@ -283,8 +283,8 @@ class QrCode final { /*-- Static function --*/ - // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result - // are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8. + // Returns the product of the two given field elements modulo GF(2^8/0x11D). + // All inputs are valid. This could be implemented as a 256*256 lookup table. private: static std::uint8_t multiply(std::uint8_t x, std::uint8_t y); };