Socket
Socket
Sign inDemoInstall

@aws-crypto/hkdf-node

Package Overview
Dependencies
1
Maintainers
9
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aws-crypto/hkdf-node

nodejs hkdf crypto primitive


Version published
Maintainers
9
Install size
83.1 kB
Created

Readme

Source

@aws-crypto/hkdf-node

This module exports a HMAC-based Key Derivation Function (HKDF) for Node.js. HKDF is very simple to implement, but this module has been reviewed and has extensive test vectors.

This module is used in the the AWS Encryption SDK for JavaScript to provide HKDF key derivation for specific algorithm suites.

Specification: https://tools.ietf.org/html/rfc5869

install

npm install @aws-crypto/hkdf-node

use

  const HKDF = require('@aws-crypto/hkdf-node')
  const expand = HKDF('sha256')('some key', 'some salt')
  const info = {some: 'info', message_id: 123}
  const key = expand(32, Buffer.from(JSON.stringify(info)))

test

npm test

license

This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.

FAQs

Last updated on 14 Jul 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc