mirror of
https://github.com/emn178/js-sha512.git
synced 2026-08-13 13:01:37 +08:00
Fixed incorrect result when first bit is 1 of bytes.
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* [js-sha512]{@link https://github.com/emn178/js-sha512}
|
||||
*
|
||||
* @version 0.7.0
|
||||
* @version 0.7.1
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2017
|
||||
* @license MIT
|
||||
@@ -324,7 +324,7 @@
|
||||
blocks[25] = blocks[26] = blocks[27] = blocks[28] =
|
||||
blocks[29] = blocks[30] = blocks[31] = blocks[32] = 0;
|
||||
}
|
||||
blocks[30] = this.hBytes << 3 | this.bytes >> 29;
|
||||
blocks[30] = this.hBytes << 3 | this.bytes >>> 29;
|
||||
blocks[31] = this.bytes << 3;
|
||||
this.hash();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user