Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/beximco/mrp_process/node_modules/qrcode/lib/core/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const Utils = require('./utils')
const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)
const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)
const G15_BCH = Utils.getBCHDigit(G15)
/**
* Returns format information with relative error correction bits
*
* The format information is a 15-bit sequence containing 5 data bits,
* with 10 error correction bits calculated using the (15, 5) BCH code.
*
* @param {Number} errorCorrectionLevel Error correction level
* @param {Number} mask Mask pattern
* @return {Number} Encoded format information bits
*/
exports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {
const data = ((errorCorrectionLevel.bit << 3) | mask)
let d = data << 10
while (Utils.getBCHDigit(d) - G15_BCH >= 0) {
d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))
}
// xor final data with mask pattern in order to ensure that
// no combination of Error Correction Level and data mask pattern
// will result in an all-zero data string
return ((data << 10) | d) ^ G15_MASK
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.006 ]-- |