You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

liamloads-hash

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

liamloads-hash

Calculate fast and secure 32-byte hash strings with JavaScript.

1.0.5
unpublished
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

About

Description

This is a fast and cryptographically-secure hashing algorithm with no known collisions.

It's written in JavaScript and outputs persistent 32-byte hexadecimal digests from variable-length string payloads.

A complete line-by-line algorithm code explanation is coming soon.

License

The Unlicense

Installation

Browser

git clone https://github.com/liamloads/javascript-hash.git
<script src="liamloads-hash.js" type="text/javascript"></script>

Node.js

npm install liamloads-hash
const liamloadsHash = require('liamloads-hash');

Usage

Details

The return value is a unique string hexadecimal number digest with a fixed character length of 64.

If the argument isn't a string or if the UTF-16 code unit length exceeds 999999999, the return value is false.

Examples

console.log(liamloadsHash('0123456789'));
// 'f06dcc113fbffd00fe814d62e93b91c0ab0ddb5505abaac68f5209c1185ad96c'

console.log(liamloadsHash('◯'));
// '6e9e92171e9b118b63f7fd2c0d7242581253047d198478c4a91cc7138ce670f4'

console.log(liamloadsHash(''));
// '9ad3de7c1e4478fd872e6340de0ac2db4bae21b1bcada7cf92b52adf24601c63'

console.log(liamloadsHash(['◯']));
// false

Keywords

algorithm

FAQs

Package last updated on 25 Aug 2022

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.