-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- TypeScript support. - ArrayBuffer method. Deprecated - Buffer method.
- Loading branch information
Showing
8 changed files
with
190 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,66 @@ | ||
# v0.5.4 / 2016-09-12 | ||
|
||
* Added CommonJS detection. | ||
|
||
# v0.5.3 / 2016-09-08 | ||
|
||
* Added some files to npm package. | ||
|
||
# v0.5.2 / 2016-06-06 | ||
|
||
* Fixed shake output incorrect in the special length. | ||
|
||
# v0.5.1 / 2015-10-27 | ||
|
||
* Update package.json and bower.json. | ||
|
||
# v0.5.0 / 2015-09-23 | ||
|
||
* Support update interface. | ||
|
||
# v0.4.1 / 2015-09-18 | ||
|
||
* Support to output Integer Array. | ||
* Fixed shake output incorrect when it's greater than 1088. | ||
|
||
# v0.4.0 / 2015-09-17 | ||
|
||
* Support to output ArrayBuffer. | ||
* Add shake alogirthms. | ||
|
||
# v0.3.1 / 2015-05-22 | ||
|
||
* Fixed bugs. | ||
|
||
# v0.3.0 / 2015-05-21 | ||
|
||
* Support byte array and ArrayBuffer input. | ||
|
||
# v0.2.0 / 2015-04-04 | ||
|
||
* Implement NIST's May 2014 SHA-3 version. | ||
* Rename original methods to keccak. | ||
|
||
# v0.1.2 / 2015-02-27 | ||
|
||
* Improve performance. | ||
|
||
# v0.1.1 / 2015-02-26 | ||
|
||
* Improve performance. | ||
|
||
# v0.1.0 / 2015-02-23 | ||
|
||
* Initial release | ||
# Change Log | ||
|
||
## v0.5.5 / 2016-09-26 | ||
### Added | ||
- TypeScript support. | ||
- ArrayBuffer method. | ||
### Deprecated | ||
- Buffer method. | ||
|
||
## v0.5.4 / 2016-09-12 | ||
### Fixed | ||
- CommonJS detection. | ||
|
||
## v0.5.3 / 2016-09-08 | ||
### Added | ||
- Some missing files to npm package. | ||
|
||
## v0.5.2 / 2016-06-06 | ||
### Fixed | ||
- Shake output incorrect in the special length. | ||
|
||
## v0.5.1 / 2015-10-27 | ||
### Fixed | ||
- Version in package.json and bower.json. | ||
|
||
## v0.5.0 / 2015-09-23 | ||
### Added | ||
- Hash object with create/update interface. | ||
|
||
## v0.4.1 / 2015-09-18 | ||
### Added | ||
- Integer array output. | ||
### Fixed | ||
- Shake output incorrect when it's greater than 1088. | ||
|
||
## v0.4.0 / 2015-09-17 | ||
### Added | ||
- ArrayBuffer output. | ||
- Shake alogirthms. | ||
|
||
## v0.3.1 / 2015-05-22 | ||
### Fixed | ||
- Some bugs. | ||
|
||
## v0.3.0 / 2015-05-21 | ||
### Added | ||
- Integer array input. | ||
- ArrayBuffer input. | ||
|
||
## v0.2.0 / 2015-04-04 | ||
### Added | ||
- NIST's May 2014 SHA-3 version. | ||
### Changed | ||
- Rename original methods to keccak. | ||
|
||
## v0.1.2 / 2015-02-27 | ||
### Changed | ||
- Improve performance. | ||
|
||
## v0.1.1 / 2015-02-26 | ||
### Changed | ||
- Improve performance. | ||
|
||
## v0.1.0 / 2015-02-23 | ||
### Added | ||
- First version implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "js-sha3", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"main": ["src/sha3.js"], | ||
"ignore": [ | ||
"samples", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
type Message = string | number[] | ArrayBuffer | Uint8Array; | ||
|
||
interface Hasher { | ||
/** | ||
* Update hash | ||
* | ||
* @param message The message you want to hash. | ||
*/ | ||
update(message: Message): Hasher; | ||
|
||
/** | ||
* Return hash in hex string. | ||
*/ | ||
hex(): string; | ||
|
||
/** | ||
* Return hash in hex string. | ||
*/ | ||
toString(): string; | ||
|
||
/** | ||
* Return hash in ArrayBuffer. | ||
*/ | ||
arrayBuffer(): ArrayBuffer; | ||
|
||
/** | ||
* Return hash in integer array. | ||
*/ | ||
digest(): number[]; | ||
|
||
/** | ||
* Return hash in integer array. | ||
*/ | ||
array(): number[]; | ||
} | ||
|
||
interface Hash { | ||
/** | ||
* Hash and return hex string. | ||
* | ||
* @param message The message you want to hash. | ||
*/ | ||
(message: Message): string; | ||
|
||
/** | ||
* Create a hash object. | ||
*/ | ||
create(): Hasher; | ||
|
||
/** | ||
* Create a hash object and hash message. | ||
* | ||
* @param message The message you want to hash. | ||
*/ | ||
update(message: Message): Hasher; | ||
} | ||
|
||
interface ShakeHash { | ||
/** | ||
* Hash and return hex string. | ||
* | ||
* @param message The message you want to hash. | ||
* @param outputBits The length of output. | ||
*/ | ||
(message: Message, outputBits: number): string; | ||
|
||
/** | ||
* Create a hash object. | ||
* | ||
* @param outputBits The length of output. | ||
*/ | ||
create(outputBits: number): Hasher; | ||
|
||
/** | ||
* Create a hash object and hash message. | ||
* | ||
* @param message The message you want to hash. | ||
* @param outputBits The length of output. | ||
*/ | ||
update(message: Message, outputBits: number): Hasher; | ||
} | ||
|
||
export var sha3_512: Hash; | ||
export var sha3_384: Hash; | ||
export var sha3_256: Hash; | ||
export var sha3_224: Hash; | ||
export var keccak_512: Hash; | ||
export var keccak_384: Hash; | ||
export var keccak_256: Hash; | ||
export var keccak_224: Hash; | ||
export var shake_128: ShakeHash; | ||
export var shake_256: ShakeHash; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.