crypt.Sha1 Extends goog.crypt.Hash
SHA-1 cryptographic hash constructor. The properties declared here are discussed in the above algorithm document.

Inheritance

Constructor

goog.crypt.Sha1()

Instance Methods

Public Protected Private
compress_(bufopt_offset)
Internal compress helper function.
Arguments:
buf : Array.<number> | Uint8Array | string
Block to compress.
opt_offset : number=
Offset of the block in the buffer.
code »
digest()
No description.
code »
reset()
No description.
code »
update()
No description.
code »
digest() !Array.<number>
No description.
Returns: !Array.<number>  The finalized hash computed from the internal accumulator.
code »
update(bytesopt_length)
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.
Arguments:
bytes : Array.<number> | Uint8Array | string
Data used for the update.
opt_length : number=
Number of bytes to use.
code »

Instance Properties

W_ :
An array of 80 bytes, each a part of the message to be hashed. Referred to as the message schedule in the docs.
Code »
buf_ :
A buffer holding the partially computed hash result.
Code »
chain_ :
Holds the previous values of accumulated variables a-e in the compress_ function.
Code »
constructor :
No description.
Code »
inbuf_ :
No description.
Code »
pad_ :
Contains data needed to pad messages less than 64 bytes.
Code »
total_ :
No description.
Code »
blockSize :
The block size for the hasher.
Code »
reset :
Resets the internal accumulator.
Code »

Static Properties

goog.crypt.Sha1.superClass_ :
No description.
Code »

Package crypt

Package Reference