From d416d5cb3e691d2f172335ee544fb777b0207640 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Mon, 8 May 2017 06:40:58 +0000 Subject: [PATCH] Renamed a Python method to be private for consistency. --- python/qrcodegen.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/qrcodegen.py b/python/qrcodegen.py index cffcbe1..c98dd26 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -776,10 +776,10 @@ class _ReedSolomonGenerator(object): for i in range(degree): # Multiply the current product by (x - r^i) for j in range(degree): - self.coefficients[j] = _ReedSolomonGenerator.multiply(self.coefficients[j], root) + self.coefficients[j] = _ReedSolomonGenerator._multiply(self.coefficients[j], root) if j + 1 < degree: self.coefficients[j] ^= self.coefficients[j + 1] - root = _ReedSolomonGenerator.multiply(root, 0x02) + root = _ReedSolomonGenerator._multiply(root, 0x02) def get_remainder(self, data): @@ -792,12 +792,12 @@ class _ReedSolomonGenerator(object): del result[0] result.append(0) for i in range(len(result)): - result[i] ^= _ReedSolomonGenerator.multiply(self.coefficients[i], factor) + result[i] ^= _ReedSolomonGenerator._multiply(self.coefficients[i], factor) return result @staticmethod - def multiply(x, y): + def _multiply(x, y): """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.""" if x >> 8 != 0 or y >> 8 != 0: