RangeError in authCipher.js

Đang mở
#58 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

@calvinmetcalf đang làm issue này rồi.

Từ ngày 7/12/2018.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Hi, thanks for provide this package for aes support. When I try aes encrypt this error comes out, but it seems I can not fix it from outside.

Error message:

RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8
            at boundsError (internal/buffer.js:55:9)
            at Buffer.writeUIntBE (internal/buffer.js:588:3)
            at webpack:///node_modules/browserify-aes/authCipher.js:37 <- index.js:7:174349
            at new u (webpack:///node_modules/browserify-aes/authCipher.js:52 <- index.js:7:174434)
            at Object.l (webpack:///node_modules/browserify-aes/encrypter.js:99 <- index.js:7:256315)
            at f (webpack:///node_modules/browserify-cipher/browser.js:45 <- index.js:7:245646)
            at Function.encrypt (webpack:///src/util/Crypto.js:82:34 <- index.js:7:237811)
            at Context.it (webpack:///test/unit/specs/util/Crypto.spec.js:8:30 <- index.js:7:232580)

Error code:

  ghash.update(Buffer.alloc(8, 0))
  var ivBits = len * 8
  var tail = Buffer.alloc(8)
  tail.writeUIntBE(ivBits, 0, 8) // <- here
  ghash.update(tail)
Ngôn ngữ chính
JavaScript
Star
62
Fork
28
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của browserify/browserify-aes

Tất cả issue của browserify/browserify-aes

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.