Blake2bSink
Defined in: packages/crypto-hash/src/blake2/blake2b-sink.ts:20
An incremental BLAKE2b hasher, unkeyed — see Sha2_32Sink’s module doc for
the general WritableStream<Uint8Array> pattern shared by every sink in this
package.
Uses BlockAccumulator’s holdBackFinalBlock mode: BLAKE2’s finalization
has no padding marker byte, so the last full block must be held back until
it’s known not to be the final one — see that class’s doc for why.
Throws
Section titled “Throws”When outputBytes is not an integer in [1, 64].
Extends
Section titled “Extends”WritableStream<Uint8Array>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Blake2bSink(
outputBytes?):Blake2bSink
Defined in: packages/crypto-hash/src/blake2/blake2b-sink.ts:23
Parameters
Section titled “Parameters”outputBytes?
Section titled “outputBytes?”number = 64
Returns
Section titled “Returns”Blake2bSink
Overrides
Section titled “Overrides”WritableStream<Uint8Array>.constructor
Properties
Section titled “Properties”locked
Section titled “locked”
readonlylocked:boolean
Defined in: node_modules/.store/@types-web-npm-0.0.361-9908d15a9c/package/index.d.ts:42656
The locked read-only property of the WritableStream interface returns a boolean indicating whether the WritableStream is locked to a writer.
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”digest
Section titled “digest”Get Signature
Section titled “Get Signature”get digest():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/crypto-hash/src/blake2/blake2b-sink.ts:68
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
Methods
Section titled “Methods”abort()
Section titled “abort()”abort(
reason?):Promise<void>
Defined in: node_modules/.store/@types-web-npm-0.0.361-9908d15a9c/package/index.d.ts:42662
The abort() method of the WritableStream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
Parameters
Section titled “Parameters”reason?
Section titled “reason?”any
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”WritableStream.abort
close()
Section titled “close()”close():
Promise<void>
Defined in: node_modules/.store/@types-web-npm-0.0.361-9908d15a9c/package/index.d.ts:42668
The close() method of the WritableStream interface closes the associated stream. All chunks written before this method is called are sent before the returned promise is fulfilled.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”WritableStream.close
getWriter()
Section titled “getWriter()”getWriter():
WritableStreamDefaultWriter<Uint8Array<ArrayBufferLike>>
Defined in: node_modules/.store/@types-web-npm-0.0.361-9908d15a9c/package/index.d.ts:42674
The getWriter() method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance. While the stream is locked, no other writer can be acquired until this one is released.
Returns
Section titled “Returns”WritableStreamDefaultWriter<Uint8Array<ArrayBufferLike>>
Inherited from
Section titled “Inherited from”WritableStream.getWriter