Socket
Socket
Sign inDemoInstall

@noble/hashes

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noble/hashes - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

package.json
{
"name": "@noble/hashes",
"version": "1.1.0",
"version": "1.1.1",
"description": "Audited & minimal 0-dependency JS implementation of SHA2, SHA3, RIPEMD, BLAKE2/3, HMAC, HKDF, PBKDF2, Scrypt",

@@ -56,2 +56,6 @@ "files": [

},
"./_assert": {
"import": "./esm/_assert.js",
"default": "./_assert.js"
},
"./_sha2": {

@@ -58,0 +62,0 @@ "import": "./esm/_sha2.js",

13

README.md

@@ -360,7 +360,10 @@ # noble-hashes ![Node CI](https://github.com/paulmillr/noble-hashes/workflows/Node%20CI/badge.svg) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

Produces ESKDF instance that has `deriveChildKey(protocol, accountId, keyLength)` function.
Produces ESKDF instance that has `deriveChildKey(protocol, accountId[, options])` function.
- `protocol` - 3-15 character protocol name
- `accountId` - numeric identifier of account
- `keyLength` - (default: 32) key length
- `options` - `keyLength: 32` with specified key length (default is 32),
or `modulus: 2n ** 221n - 17n` with specified modulus. It will fetch modulus + 64 bits of
data, execute modular division. The result will have negligible bias as per FIPS 186 B.4.1.
Can be used to generate, for example, elliptic curve keys.

@@ -371,5 +374,7 @@ Takes username and password, then takes protocol name and account id.

import { eskdf } from '@noble/hashes/eskdf';
const kdf = await eskdf('example-university', 'beginning-new-example');
const kdf = await eskdf('example@university', 'beginning-new-example');
console.log(kdf.fingerprint);
const key = kdf.deriveChildKey('aes', 0);
console.log(kdf.fingerprint);
const key = kdf.deriveChildKey('aes', 0, { keyLength: 16 });
const ecc = kdf.deriveChildKey('ecc', 0, { modulus: 2n ** 252n - 27742317777372353535851937790883648493n })
kdf.expire();

@@ -376,0 +381,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc