Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Checksum

Contains all the possible checksum or digest values for an object.

Hierarchy

  • Checksum

Index

Properties

Optional ChecksumCRC32

ChecksumCRC32: undefined | string

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

Optional ChecksumCRC32C

ChecksumCRC32C: undefined | string

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

Optional ChecksumSHA1

ChecksumSHA1: undefined | string

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

Optional ChecksumSHA256

ChecksumSHA256: undefined | string

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

Optional digestLength

digestLength: undefined | number

Constant length of the digest created by the algorithm in bytes.

Methods

Optional copy

  • Creates a new checksum object that contains a deep copy of the internal state of the current Checksum object.

    Returns Checksum

digest

  • digest(): Promise<Uint8Array>
  • Returns the digest of all of the data passed.

    Returns Promise<Uint8Array>

Optional mark

  • mark(readLimit: number): void
  • Allows marking a checksum for checksums that support the ability to mark and reset.

    Parameters

    • readLimit: number

      The maximum limit of bytes that can be read before the mark position becomes invalid.

    Returns void

reset

  • reset(): void
  • Resets the checksum to its initial value.

    Returns void

update

  • update(chunk: Uint8Array): void
  • Adds a chunk of data for which checksum needs to be computed. This can be called many times with new data as it is streamed.

    Implementations may override this method which passes second param which makes Checksum object stateless.

    Parameters

    • chunk: Uint8Array

      The buffer to update checksum with.

    Returns void