New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ch128-node

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ch128-node

Node.js bindings for cityhash-rs

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

ch128-node

Node.js bindings for cityhash-rs.

Installation

npm install ch128-node

Usage

const ch128 = require('ch128-node');

const data = Buffer.from('Hello, World!');

// CityHash v1.0.2
const hash102 = ch128.cityhash_102_128(data);
console.log(hash102.toString('hex')); // 16-byte hash

// CityHash v1.0.3  
const hash103 = ch128.cityhash_103_128(data);
console.log(hash103.toString('hex')); // 16-byte hash

// CityHash v1.1.0
const hash110 = ch128.cityhash_110_128(data);
console.log(hash110.toString('hex')); // 16-byte hash

API

cityhash_102_128(data)

  • data: Buffer - Input data to hash
  • Returns: Buffer - 16-byte hash (128-bit)

Computes CityHash v1.0.2 128-bit hash.

cityhash_103_128(data)

  • data: Buffer - Input data to hash
  • Returns: Buffer - 16-byte hash (128-bit)

Computes CityHash v1.0.3 128-bit hash.

cityhash_110_128(data)

  • data: Buffer - Input data to hash
  • Returns: Buffer - 16-byte hash (128-bit)

Computes CityHash v1.1.0 128-bit hash.

Testing

npm test

Building

npm run build

License

MIT

Keywords

hash

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

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.

Install

Related posts