Skip to content

Commit

Permalink
Merge pull request #194 from dajiaji/change-dirname-for-aead
Browse files Browse the repository at this point in the history
Expose AEAD Classes for CipherSuiteParams.
  • Loading branch information
dajiaji authored Jul 24, 2023
2 parents b4df9ed + d3e7a0a commit c36c0ec
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ export {
DhkemX448HkdfSha512,
} from "./src/kems/dhkem.ts";
export { HkdfSha256, HkdfSha384, HkdfSha512 } from "./src/kdfs/hkdf.ts";
export { Aes128Gcm, Aes256Gcm } from "./src/aeads/aesGcm.ts";
export { Chacha20Poly1305 } from "./src/aeads/chacha20Poly1305.ts";
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/cipherSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {
SenderExporterContext,
} from "./exporterContext.ts";
import { AeadId, KdfId, KemId, Mode } from "./identifiers.ts";
import { Aes128Gcm, Aes256Gcm } from "./aeadKeys/aesGcmKey.ts";
import { ExportOnly } from "./aeadKeys/exportOnly.ts";
import { Chacha20Poly1305 } from "./aeadKeys/chacha20Poly1305Key.ts";
import { Aes128Gcm, Aes256Gcm } from "./aeads/aesGcm.ts";
import { ExportOnly } from "./aeads/exportOnly.ts";
import { Chacha20Poly1305 } from "./aeads/chacha20Poly1305.ts";
import { HkdfSha256, HkdfSha384, HkdfSha512 } from "./kdfs/hkdf.ts";
import { RecipientContext } from "./recipientContext.ts";
import { SenderContext } from "./senderContext.ts";
Expand Down
3 changes: 2 additions & 1 deletion test/cipherSuite.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
DhkemX448HkdfSha512,
} from "../src/kems/dhkem.ts";
import { HkdfSha256, HkdfSha384, HkdfSha512 } from "../src/kdfs/hkdf.ts";
import { Aes128Gcm } from "../src/aeads/aesGcm.ts";

import * as errors from "../src/errors.ts";

Expand Down Expand Up @@ -231,7 +232,7 @@ describe("CipherSuite", () => {
const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: AeadId.Aes128Gcm,
aead: new Aes128Gcm(),
});

const rkp = await suite.generateKeyPair();
Expand Down
4 changes: 2 additions & 2 deletions test/encryptionContext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { AeadId, KdfId, KemId } from "../src/identifiers.ts";
import { HkdfSha256 } from "../src/kdfs/hkdf.ts";
import { loadSubtleCrypto } from "../src/webCrypto.ts";
import { i2Osp } from "../src/utils/misc.ts";
import { ExportOnly } from "../src/aeadKeys/exportOnly.ts";
import { Aes128Gcm } from "../src/aeadKeys/aesGcmKey.ts";
import { ExportOnly } from "../src/aeads/exportOnly.ts";
import { Aes128Gcm } from "../src/aeads/aesGcm.ts";

import * as consts from "../src/consts.ts";
import * as errors from "../src/errors.ts";
Expand Down

0 comments on commit c36c0ec

Please sign in to comment.