parent
bcecedf489
commit
e6c0d85555
|
@ -2,7 +2,7 @@
|
|||
name = "qrcode"
|
||||
description = "QR code encoder in Rust"
|
||||
license = "MIT OR Apache-2.0"
|
||||
version = "0.11.1"
|
||||
version = "0.11.2"
|
||||
edition = "2018"
|
||||
authors = ["kennytm <kennytm@gmail.com>"]
|
||||
keywords = ["qrcode"]
|
||||
|
|
|
@ -13,9 +13,9 @@ use crate::types::{EcLevel, QrResult, Version};
|
|||
/// 69 bytes. Longer blocks will result in task panic.
|
||||
///
|
||||
/// This method treats the data as a polynomial of the form
|
||||
/// (a[0] x<sup>m+n</sup> + a[1] x<sup>m+n-1</sup> + … + a[m] x<sup>n</sup>) in
|
||||
/// GF(256), and then computes the polynomial modulus with a generator
|
||||
/// polynomial of degree N.
|
||||
/// (a\[0\] x<sup>m+n</sup> + a\[1\] x<sup>m+n-1</sup> + … + a\[m\] x<sup>n</sup>)
|
||||
/// in GF(2<sup>8</sup>), and then computes the polynomial modulus with a
|
||||
/// generator polynomial of degree N.
|
||||
pub fn create_error_correction_code(data: &[u8], ec_code_size: usize) -> Vec<u8> {
|
||||
let data_len = data.len();
|
||||
let log_den = GENERATOR_POLYNOMIALS[ec_code_size];
|
||||
|
|
Loading…
Reference in a new issue