goog.crypt.Hash | |
goog.crypt.Sha2_64bit | goog.crypt.Hash |
goog.crypt.Sha512_256 | goog.crypt.Sha2_64bit |
Calculates the SHA2 64-bit Sigma0 function.
rotateRight(value, 28) ^ rotateRight(value, 34) ^ rotateRight(value, 39)
Arguments:
|
code » | ||||
Calculates the SHA2 64-bit Sigma1 function.
rotateRight(value, 14) ^ rotateRight(value, 18) ^ rotateRight(value, 41)
Arguments:
|
code » | ||||
Calculates the SHA-2 64-bit choose function.
This function uses
value as a mask to choose bits from either
one if the bit is set or two if the bit is not set.
Arguments:
|
code » | ||||
![]()
Updates this hash by processing the 1024-bit message chunk in this.chunk_.
|
code » | ||||
![]()
No description.
|
code » | ||||
Calculates the SHA-2 64-bit majority function.
This function returns, for each bit position, the bit held by the majority
of its three arguments.
Arguments:
|
code » | ||||
![]()
Resets this hash function.
|
code » | ||||
Calculates the SHA2 64-bit sigma0 function.
rotateRight(value, 1) ^ rotateRight(value, 8) ^ (value >>> 7)
Arguments:
|
code » | ||||
Calculates the SHA2 64-bit sigma1 function.
rotateRight(value, 19) ^ rotateRight(value, 61) ^ (value >>> 6)
Arguments:
|
code » | ||||
Adds two or more goog.math.Long values.
Arguments:
Returns: !goog.math.Long
The resulting sum.
|
code » | ||||
![]()
No description.
|
code » |
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 » |
![]()
No description.
|
Code » |
![]()
The number of bytes that are digested in each pass of this hasher.
|
Code » | |
![]()
Current number of bytes in
this.chunk_ .
|
Code » | |
![]()
A chunk holding the currently processed message bytes. Once the chunk has
this.blocksize bytes, we feed it into [@code computeChunk_}.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Holds the previous values of accumulated hash a-h in the
computeChunk_ function.
|
Code » | |
![]()
The value to which
this.hash_ should be reset when this
Hasher is reset.
|
Code » | |
![]()
If true, we have taken the digest from this hasher, but we have not
yet reset it.
|
Code » | |
![]()
The number of blocks of output produced by this hash function, where each
block is eight 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 » |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » |