Skip to content

Commit

Permalink
Deploy to DSR.
Browse files Browse the repository at this point in the history
  • Loading branch information
dajiaji committed Aug 10, 2024
1 parent 1f9b55e commit 04309b5
Show file tree
Hide file tree
Showing 20 changed files with 45 additions and 21 deletions.
3 changes: 3 additions & 0 deletions core/deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@hpke/core",
"version": "1.2.9",
"exports": "./mod.ts",
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"@std/assert": "jsr:@std/[email protected]",
Expand Down
3 changes: 2 additions & 1 deletion core/test/runtimes/browsers/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// playwright.config.ts
import { devices, PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
projects: [
Expand Down
3 changes: 3 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@dajiaji/hpke",
"version": "1.2.9",
"exports": "./mod.ts",
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"@std/assert": "jsr:@std/[email protected]",
Expand Down
6 changes: 3 additions & 3 deletions src/cipherSuiteNative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,21 @@ export class CipherSuiteNative extends NativeAlgorithm {
/**
* Gets the KEM context of the ciphersuite.
*/
public get kem() {
public get kem(): KemInterface {
return this._kem;
}

/**
* Gets the KDF context of the ciphersuite.
*/
public get kdf() {
public get kdf(): KdfInterface {
return this._kdf;
}

/**
* Gets the AEAD context of the ciphersuite.
*/
public get aead() {
public get aead(): AeadInterface {
return this._aead;
}

Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/aeadInterface.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AeadEncryptionContext } from "./aeadEncryptionContext.ts";

import { AeadId } from "../identifiers.ts";
import type { AeadId } from "../identifiers.ts";

/**
* The AEAD interface.
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/kdfInterface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { KdfId } from "../identifiers.ts";
import type { KdfId } from "../identifiers.ts";

/**
* The KDF interface.
Expand Down
3 changes: 1 addition & 2 deletions src/interfaces/kemInterface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { RecipientContextParams } from "./recipientContextParams.ts";
import type { SenderContextParams } from "./senderContextParams.ts";

import { KemId } from "../identifiers.ts";
import type { KemId } from "../identifiers.ts";

// b"KEM"
export const SUITE_ID_HEADER_KEM = new Uint8Array([75, 69, 77, 0, 0]);
Expand Down
2 changes: 1 addition & 1 deletion src/kems/dhkem.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { KdfInterface } from "../interfaces/kdfInterface.ts";
import type { KemId } from "../identifiers.ts";
import type { KemInterface } from "../interfaces/kemInterface.ts";
import type { DhkemPrimitives } from "../interfaces/dhkemPrimitives.ts";
import type { SenderContextParams } from "../interfaces/senderContextParams.ts";
import type { RecipientContextParams } from "../interfaces/recipientContextParams.ts";

import { EMPTY, INPUT_LENGTH_LIMIT } from "../consts.ts";
import { DecapError, EncapError, InvalidParamError } from "../errors.ts";
import { KemId } from "../identifiers.ts";
import { SUITE_ID_HEADER_KEM } from "../interfaces/kemInterface.ts";
import { concat, i2Osp, isCryptoKeyPair } from "../utils/misc.ts";

Expand Down
3 changes: 2 additions & 1 deletion test/runtimes/browsers/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// playwright.config.ts
import { devices, PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
projects: [
Expand Down
3 changes: 3 additions & 0 deletions x/chacha20poly1305/deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@hpke/chacha20poly1305",
"version": "1.2.9",
"exports": "./mod.ts",
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"@std/assert": "jsr:@std/[email protected]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// playwright.config.ts
import { devices, PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
projects: [
Expand Down
3 changes: 3 additions & 0 deletions x/dhkem-secp256k1/deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@hpke/dhkem-secp256k1",
"version": "1.2.9",
"exports": "./mod.ts",
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"@std/assert": "jsr:@std/[email protected]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// playwright.config.ts
import { devices, PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
projects: [
Expand Down
3 changes: 3 additions & 0 deletions x/dhkem-x25519/deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@hpke/dhkem-x25519",
"version": "1.2.9",
"exports": "./mod.ts",
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"@std/assert": "jsr:@std/[email protected]",
Expand Down
3 changes: 2 additions & 1 deletion x/dhkem-x25519/test/runtimes/browsers/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// playwright.config.ts
import { devices, PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
projects: [
Expand Down
3 changes: 3 additions & 0 deletions x/dhkem-x448/deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@hpke/dhkem-x448",
"version": "1.2.9",
"exports": "./mod.ts",
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"@std/assert": "jsr:@std/[email protected]",
Expand Down
3 changes: 2 additions & 1 deletion x/dhkem-x448/test/runtimes/browsers/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// playwright.config.ts
import { devices, PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
projects: [
Expand Down
3 changes: 3 additions & 0 deletions x/hybridkem-x25519-kyber768/deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@hpke/hybridkem-x25519-kyber768",
"version": "1.2.9",
"exports": "./mod.ts",
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"@std/assert": "jsr:@std/[email protected]",
Expand Down
9 changes: 3 additions & 6 deletions x/hybridkem-x25519-kyber768/test/conformance.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { assertEquals } from "@std/assert";
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";

import {
Aes128Gcm,
CipherSuite,
HkdfSha256,
PreSharedKey,
} from "../../../core/mod.ts";
import type { PreSharedKey } from "../../../core/mod.ts";

import { Aes128Gcm, CipherSuite, HkdfSha256 } from "../../../core/mod.ts";
import { hexToBytes } from "../../../test/utils.ts";
import { HybridkemX25519Kyber768 } from "../mod.ts";
import { TEST_VECTORS } from "./testVectors.ts";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// playwright.config.ts
import { devices, PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
projects: [
Expand Down

0 comments on commit 04309b5

Please sign in to comment.