- incorrect result when first bit is 1 of bytes.

Changed
- throw error by Error oject. #13

Added
- TypeScript interfaces. #12
This commit is contained in:
Yi-Cyuan Chen
2017-12-18 20:03:12 +08:00
parent e35c679c2b
commit 189bb9b037
6 changed files with 101 additions and 9 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
/**
* [js-sha256]{@link https://github.com/emn178/js-sha256}
*
* @version 0.8.0
* @version 0.9.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2017
* @license MIT
@@ -257,7 +257,7 @@
blocks[8] = blocks[9] = blocks[10] = blocks[11] =
blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
}
blocks[14] = this.hBytes << 3 | this.bytes >> 29;
blocks[14] = this.hBytes << 3 | this.bytes >>> 29;
blocks[15] = this.bytes << 3;
this.hash();
};