mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2025-02-24 02:18:22 +00:00
Renamed a Python method to be private for consistency.
This commit is contained in:
parent
84ab01d23a
commit
d416d5cb3e
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user