mirror of
https://github.com/emn178/js-sha3.git
synced 2026-11-13 04:08:47 +08:00
### Fixed
- Wrong digest for strings whose last UTF-8 character crosses a block boundary #62 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c3fc9645d4
commit
03e1b80195
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+2
-2
@@ -9,7 +9,7 @@ var sha3$1 = {exports: {}};
|
||||
/**
|
||||
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
||||
*
|
||||
* @version 0.13.0
|
||||
* @version 0.14.0
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2015-2026
|
||||
* @license MIT
|
||||
@@ -425,7 +425,7 @@ var sha3$1 = {exports: {}};
|
||||
this.finalized = true;
|
||||
var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;
|
||||
blocks[i >> 2] |= this.padding[i & 3];
|
||||
if (this.lastByteIndex === this.byteCount) {
|
||||
if (this.lastByteIndex >= this.byteCount) {
|
||||
blocks[0] = blocks[blockCount];
|
||||
for (i = 1; i < blockCount + 1; ++i) {
|
||||
blocks[i] = 0;
|
||||
|
||||
Reference in New Issue
Block a user