@aws-sdk/middleware-flexible-checksums
Advanced tools
Comparing version 3.688.0 to 3.689.0
@@ -8,2 +8,16 @@ "use strict"; | ||
const zlib = tslib_1.__importStar(require("zlib")); | ||
class NodeCrc32 { | ||
constructor() { | ||
this.checksum = 0; | ||
} | ||
update(data) { | ||
this.checksum = zlib.crc32(data, this.checksum); | ||
} | ||
async digest() { | ||
return (0, util_1.numToUint8)(this.checksum); | ||
} | ||
reset() { | ||
this.checksum = 0; | ||
} | ||
} | ||
const getCrc32ChecksumAlgorithmFunction = () => { | ||
@@ -13,17 +27,4 @@ if (typeof zlib.crc32 === "undefined") { | ||
} | ||
return class NodeCrc32 { | ||
constructor() { | ||
this.checksum = 0; | ||
} | ||
update(data) { | ||
this.checksum = zlib.crc32(data, this.checksum); | ||
} | ||
async digest() { | ||
return (0, util_1.numToUint8)(this.checksum); | ||
} | ||
reset() { | ||
this.checksum = 0; | ||
} | ||
}; | ||
return NodeCrc32; | ||
}; | ||
exports.getCrc32ChecksumAlgorithmFunction = getCrc32ChecksumAlgorithmFunction; |
import { AwsCrc32 } from "@aws-crypto/crc32"; | ||
import { numToUint8 } from "@aws-crypto/util"; | ||
import * as zlib from "zlib"; | ||
class NodeCrc32 { | ||
constructor() { | ||
this.checksum = 0; | ||
} | ||
update(data) { | ||
this.checksum = zlib.crc32(data, this.checksum); | ||
} | ||
async digest() { | ||
return numToUint8(this.checksum); | ||
} | ||
reset() { | ||
this.checksum = 0; | ||
} | ||
} | ||
export const getCrc32ChecksumAlgorithmFunction = () => { | ||
@@ -8,16 +22,3 @@ if (typeof zlib.crc32 === "undefined") { | ||
} | ||
return class NodeCrc32 { | ||
constructor() { | ||
this.checksum = 0; | ||
} | ||
update(data) { | ||
this.checksum = zlib.crc32(data, this.checksum); | ||
} | ||
async digest() { | ||
return numToUint8(this.checksum); | ||
} | ||
reset() { | ||
this.checksum = 0; | ||
} | ||
}; | ||
return NodeCrc32; | ||
}; |
import { AwsCrc32 } from "@aws-crypto/crc32"; | ||
export declare const getCrc32ChecksumAlgorithmFunction: () => typeof AwsCrc32 | { | ||
new (): { | ||
checksum: number; | ||
update(data: Uint8Array): void; | ||
digest(): Promise<Uint8Array>; | ||
reset(): void; | ||
}; | ||
}; | ||
import { Checksum } from "@smithy/types"; | ||
declare class NodeCrc32 implements Checksum { | ||
private checksum; | ||
update(data: Uint8Array): void; | ||
digest(): Promise<Uint8Array>; | ||
reset(): void; | ||
} | ||
export declare const getCrc32ChecksumAlgorithmFunction: () => typeof NodeCrc32 | typeof AwsCrc32; | ||
export {}; |
import { AwsCrc32 } from "@aws-crypto/crc32"; | ||
import { Checksum } from "@smithy/types"; | ||
declare class NodeCrc32 implements Checksum { | ||
private checksum; | ||
update(data: Uint8Array): void; | ||
digest(): Promise<Uint8Array>; | ||
reset(): void; | ||
} | ||
export declare const getCrc32ChecksumAlgorithmFunction: () => | ||
| typeof AwsCrc32 | ||
| { | ||
new (): { | ||
checksum: number; | ||
update(data: Uint8Array): void; | ||
digest(): Promise<Uint8Array>; | ||
reset(): void; | ||
}; | ||
}; | ||
| typeof NodeCrc32 | ||
| typeof AwsCrc32; | ||
export {}; |
{ | ||
"name": "@aws-sdk/middleware-flexible-checksums", | ||
"version": "3.688.0", | ||
"version": "3.689.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74903
1336