Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyramation/etag-hash
Es6 class that generates ETag using the same algorithm as S3 via MD5 sum.
https://github.com/pyramation/etag-hash
es6 etag hash md5 minio node-module npm s3
Last synced: 3 months ago
JSON representation
Es6 class that generates ETag using the same algorithm as S3 via MD5 sum.
- Host: GitHub
- URL: https://github.com/pyramation/etag-hash
- Owner: pyramation
- License: mit
- Created: 2018-10-15T05:23:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T00:22:00.000Z (over 4 years ago)
- Last Synced: 2024-10-11T08:14:51.550Z (3 months ago)
- Topics: es6, etag, hash, md5, minio, node-module, npm, s3
- Language: JavaScript
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# ETag Hash ![Build Status](https://travis-ci.org/pyramation/etag-hash.svg?branch=master)
Es6 class that generates ETag using the same algorithm as S3 via MD5 sum.
Useful for verifying Amazon S3 multi-part uploads.
## Installation
```sh
npm install etag-hash
```## Usage
```js
const createHash = require('etag-hash').createHash;
const etag = createHash().update(contents).digest();
```ETags compatible with s3, API similar to the crypto module to be compatible with streams. Thanks to the author of [this post](https://stackoverflow.com/questions/12186993/what-is-the-algorithm-to-compute-the-amazon-s3-etag-for-a-file-larger-than-5gb#answer-19896823) for the breakdown of the algorithm.