import { HkdfSha256 } from "https://deno.land/x/hpke@1.2.9/core/mod.ts";
The HKDF-SHA256 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.HkdfSha256
.
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
Example 1
import {
Aes128Gcm,
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "http://deno.land/x/hpke/core/mod.ts";
const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: new Aes128Gcm(),
});