4.0.0 • Published 10 months ago

@aws-crypto/hkdf-node v4.0.0

Weekly downloads
17,576
License
Apache-2.0
Repository
-
Last release
10 months ago

@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.

4.0.0

10 months ago

3.0.0

3 years ago

2.4.0

3 years ago

2.2.0

3 years ago

1.9.0

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago

0.2.0-preview.1

5 years ago