|
|
@ -784,8 +784,9 @@ var qrcodegen = new function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Returns a segment representing the given text string encoded in alphanumeric mode. The characters allowed are:
|
|
|
|
* Returns a segment representing the given text string encoded in alphanumeric mode.
|
|
|
|
* 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
|
|
|
|
* The characters allowed are: 0 to 9, A to Z (uppercase only), space,
|
|
|
|
|
|
|
|
* dollar, percent, asterisk, plus, hyphen, period, slash, colon.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
this.QrSegment.makeAlphanumeric = function(text) {
|
|
|
|
this.QrSegment.makeAlphanumeric = function(text) {
|
|
|
|
if (!this.ALPHANUMERIC_REGEX.test(text))
|
|
|
|
if (!this.ALPHANUMERIC_REGEX.test(text))
|
|
|
@ -953,8 +954,9 @@ var qrcodegen = new function() {
|
|
|
|
root = ReedSolomonGenerator.multiply(root, 0x02);
|
|
|
|
root = ReedSolomonGenerator.multiply(root, 0x02);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Computes and returns the Reed-Solomon error correction codewords for the given sequence of data codewords.
|
|
|
|
// Computes and returns the Reed-Solomon error correction codewords for the given
|
|
|
|
// The returned object is always a new byte array. This method does not alter this object's state (because it is immutable).
|
|
|
|
// sequence of data codewords. The returned object is always a new byte array.
|
|
|
|
|
|
|
|
// This method does not alter this object's state (because it is immutable).
|
|
|
|
this.getRemainder = function(data) {
|
|
|
|
this.getRemainder = function(data) {
|
|
|
|
// Compute the remainder by performing polynomial division
|
|
|
|
// Compute the remainder by performing polynomial division
|
|
|
|
var result = coefficients.map(function() { return 0; });
|
|
|
|
var result = coefficients.map(function() { return 0; });
|
|
|
|