goog.crypt.Hash | |
goog.crypt.Sha2 | goog.crypt.Hash |
goog.crypt.Sha224 | goog.crypt.Sha2 |
goog.crypt.Sha256 | goog.crypt.Sha2 |
numHashBlocks
: number
The size of output in 16-byte blocks.
|
initHashBlocks
: Array.<number>
The hash-specific initialization
|
No description.
|
code » | |
![]()
Adds a byte array (array with values in [0-255] range) or a string (might
only contain 8-bit, i.e., Latin1 characters) to the internal accumulator.
Many hash functions operate on blocks of data and implement optimizations
when a full chunk of data is readily available. Hence it is often preferable
to provide large chunks of data (a kilobyte or more) than to repeatedly
call the update method with few tens of bytes. If this is not possible, or
not feasible, it might be good to provide data in multiplies of hash block
size (often 64 bytes). Please see the implementation and performance tests
of your favourite hash.
|
code » |
![]()
A chunk holding the currently processed message bytes. Once the chunk has
64 bytes, we feed it into computeChunk_ function and reset this.chunk_.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Holds the previous values of accumulated hash a-h in the computeChunk_
function.
|
Code » | |
![]()
Current number of bytes in this.chunk_.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
The number of output hash blocks (each block is 4 bytes long).
|
Code » | |
![]()
Total number of bytes in currently processed message.
|
Code » | |
![]()
Temporary array used in chunk computation. Allocate here as a
member rather than as a local within computeChunk_() as a
performance optimization to reduce the number of allocations and
reduce garbage collection.
|
Code » |
![]()
The block size
|
Code » | |
![]()
Constants used in SHA-2.
|
Code » | |
![]()
Sha2.K as an Int32Array if this JS supports typed arrays; otherwise,
the same array as Sha2.K.
The compiler cannot remove an Int32Array, even if it is not needed
(There are certain cases where creating an Int32Array is not
side-effect free). Instead, the first time we construct a Sha2
instance, we convert or assign Sha2.K as appropriate.
|
Code » | |
![]()
Contains data needed to pad messages less than BLOCK_SIZE_ bytes.
|
Code » | |
![]()
No description.
|
Code » |