Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@aws-sdk/hash-stream-node
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/hash-stream-node/latest.svg)](https://www.npmjs.com/package/@aws-sdk/hash-stream-node) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/hash-stream-node.svg)](https://www.npmjs.com/package/@aws
@aws-sdk/hash-stream-node is a package from the AWS SDK for JavaScript that provides utilities for hashing streams. It is particularly useful for creating hash digests of data streams, which is a common requirement when working with AWS services like S3 for data integrity checks.
Hashing a Stream
This feature allows you to create a hash digest of a data stream using a specified hashing algorithm (e.g., SHA-256). The code sample demonstrates how to read a file as a stream and generate its hash digest.
const { Hash } = require('@aws-sdk/hash-stream-node');
const { createReadStream } = require('fs');
const stream = createReadStream('path/to/file');
const hash = new Hash('sha256');
hash.update(stream);
hash.digest().then(digest => {
console.log('Hash digest:', digest);
});
The 'crypto' module is a built-in Node.js module that provides cryptographic functionality, including hashing. It can be used to hash streams, but it requires more manual setup compared to @aws-sdk/hash-stream-node. For example, you need to manually handle the stream events and update the hash accordingly.
The 'hash-stream' package is a third-party Node.js module that simplifies hashing streams. It provides a more straightforward API for hashing streams compared to the built-in 'crypto' module, but it may not be as tightly integrated with AWS services as @aws-sdk/hash-stream-node.
The 'stream-hash' package is another third-party module for hashing streams. It offers similar functionality to @aws-sdk/hash-stream-node but is more general-purpose and not specifically designed for AWS SDK integration.
A utility for calculating the hash of Node.JS readable streams.
An internal package
You probably shouldn't, at least directly.
3.374.0 (2023-07-20)
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/hash-stream-node/latest.svg)](https://www.npmjs.com/package/@aws-sdk/hash-stream-node) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/hash-stream-node.svg)](https://www.npmjs.com/package/@aws
The npm package @aws-sdk/hash-stream-node receives a total of 677,007 weekly downloads. As such, @aws-sdk/hash-stream-node popularity was classified as popular.
We found that @aws-sdk/hash-stream-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.