Class HashStreamValidator (7.16.0)

Inheritance

Transform >HashStreamValidator

Package

@google-cloud/storage

Constructors

(constructor)(options)

constructor(options?:Partial<HashStreamValidatorOptions>);

Constructs a new instance of theHashStreamValidator class

Parameter
NameDescription
optionsPartial<HashStreamValidatorOptions>

Properties

crc32c

getcrc32c():string|undefined;

Return the current CRC32C value, if available.

crc32cEnabled

readonlycrc32cEnabled:boolean;

crc32cExpected

readonlycrc32cExpected:string|undefined;

md5Enabled

readonlymd5Enabled:boolean;

md5Expected

readonlymd5Expected:string|undefined;

updateHashesOnly

readonlyupdateHashesOnly:boolean;

Methods

_flush(callback)

_flush(callback:(error?:Error|null|undefined)=>void):void;
Parameter
NameDescription
callback(error?:Error | null | undefined) => void
Returns
TypeDescription
void

_transform(chunk, encoding, callback)

_transform(chunk:Buffer,encoding:BufferEncoding,callback:(e?:Error)=>void):void;
Parameters
NameDescription
chunkBuffer
encodingBufferEncoding
callback(e?:Error) => void
Returns
TypeDescription
void

test(hash, sum)

test(hash:'crc32c'|'md5',sum:Buffer|string):boolean;
Parameters
NameDescription
hash'crc32c' | 'md5'
sum"\"buffer\"".__global.Buffer | string
Returns
TypeDescription
boolean

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.