Class: Sha512
Class to help with Sha512 scheme TypeScript conversion from https://github.com/emn178/js-sha512.
Table of contents
Properties
Constructors
Methods
Properties
SIZE_224
▪ Static
SIZE_224: number
= 224
Sha512 224.
SIZE_256
▪ Static
SIZE_256: number
= 256
Sha512 256.
SIZE_384
▪ Static
SIZE_384: number
= 384
Sha512 384.
SIZE_512
▪ Static
SIZE_512: number
= 512
Sha512 512.
Constructors
constructor
• new Sha512(bits?
)
Create a new instance of Sha512.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
bits | number | Sha512.SIZE_512 | The number of bits. |
Methods
sum512
▸ Static
sum512(data
): Uint8Array
Perform Sum 512 on the data.
Parameters
Name | Type | Description |
---|---|---|
data | Uint8Array | The data to operate on. |
Returns
Uint8Array
The sum 512 of the data.
update
▸ update(message
): Sha512
Update the hash with the data.
Parameters
Name | Type | Description |
---|---|---|
message | Uint8Array | The data to update the hash with. |
Returns
The instance for chaining.
digest
▸ digest(): Uint8Array
Get the digest.
Returns
Uint8Array
The digest.