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

x/hpke/core/mod.ts>Aes128Gcm

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

The AES-128-GCM for HPKE AEAD implementing AeadInterface.

When using @hpke/core, the instance of this class must be specified to the aead parameter of CipherSuiteParams instead of AeadId.Aes128Gcm.

Examples

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(),
});

Properties

readonly
id: AeadId

AeadId.Aes128Gcm (0x0001)

readonly
keySize: number

16

readonly
nonceSize: number

12

readonly
tagSize: number

16