Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hpke/core/mod.ts>HkdfSha384

A Hybrid Public Key Encryption (HPKE) module built on top of Web Cryptography API.
Latest
class HkdfSha384
extends HkdfSha384Native
import { HkdfSha384 } from "https://deno.land/x/hpke@1.2.7/core/mod.ts";

The HKDF-SHA384 for HPKE KDF implementing KdfInterface.

When using @hpke/core, the instance of this class must be specified to the kem parameter of CipherSuiteParams instead of KdfId.HkdfSha384.

The KDF class can only derive keys of the same length as the hashSize. If you want to derive keys longer than the hashSize, please use hpke-js#CipherSuite.

Examples

Example 1

import {
  Aes128Gcm,
  CipherSuite,
  DhkemP384HkdfSha384,
  HkdfSha384,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
  kem: new DhkemP384HkdfSha384(),
  kdf: new HkdfSha384(),
  aead: new Aes128Gcm(),
});