Skip to content

Commit b18a1c5

Browse files
committed
Move chacha20poly1305 impl to x/chacha20poly1305.
1 parent 134b539 commit b18a1c5

File tree

15 files changed

+85
-31
lines changed

15 files changed

+85
-31
lines changed

deno.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,29 @@
44
"exports": "./mod.ts",
55
"imports": {
66
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
7+
"@hpke/core": "jsr:@hpke/core@^1.2.9",
78
"@std/assert": "jsr:@std/[email protected]",
89
"@std/testing": "jsr:@std/testing@^1.0.0"
910
},
1011
"publish": {
12+
"include": [
13+
"README.md",
14+
"core/",
15+
"deno.json",
16+
"deno.lock",
17+
"mod.ts",
18+
"src/",
19+
"x/chacha20poly1305/src/"
20+
],
1121
"exclude": [
12-
".github/",
1322
"core/LICENSE",
1423
"core/README.md",
1524
"core/deno.json",
1625
"core/deno.lock",
1726
"core/dnt.ts",
27+
"core/samples/",
1828
"core/test/",
19-
"core/tsconfig.json",
20-
"dnt.ts",
21-
"samples/",
22-
"test/",
23-
"x/"
29+
"core/tsconfig.json"
2430
]
2531
},
2632
"fmt": {

deno.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dnt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ await build({
2222
test: true,
2323
declaration: "inline",
2424
scriptModule: "umd",
25-
importMap: "./deno.json",
25+
importMap: "./import_map_for_dnt.json",
2626
compilerOptions: {
2727
lib: ["ES2022", "DOM"],
2828
},

import_map_for_dnt.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"imports": {
3+
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
4+
"@hpke/core": "npm:@hpke/core@^1.2.9",
5+
"@std/assert": "jsr:@std/[email protected]",
6+
"@std/testing": "jsr:@std/testing@^1.0.0"
7+
}
8+
}

src/cipherSuite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { KemInterface } from "../core/src/interfaces/kemInterface.ts";
33

44
import { Aes128Gcm, Aes256Gcm } from "../core/src/aeads/aesGcm.ts";
55
import { ExportOnly } from "../core/src/aeads/exportOnly.ts";
6-
import { Chacha20Poly1305 } from "./aeads/chacha20Poly1305.ts";
6+
import { Chacha20Poly1305 } from "../x/chacha20poly1305/src/chacha20Poly1305.ts";
77
import { InvalidParamError } from "../core/src/errors.ts";
88
import { HkdfSha256 } from "./kdfs/hkdfSha256.ts";
99
import { HkdfSha384 } from "./kdfs/hkdfSha384.ts";

test/cipherSuiteNative.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
KemId,
1010
} from "../mod.ts";
1111
import { Aes128Gcm, Aes256Gcm } from "../core/src/aeads/aesGcm.ts";
12-
import { Chacha20Poly1305 } from "../src/aeads/chacha20Poly1305.ts";
12+
import { Chacha20Poly1305 } from "../x/chacha20poly1305/mod.ts";
1313
import { ExportOnly } from "../core/src/aeads/exportOnly.ts";
1414
import { CipherSuiteNative } from "../core/src/cipherSuiteNative.ts";
1515
import {

x/chacha20poly1305/deno.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@
44
"exports": "./mod.ts",
55
"imports": {
66
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
7+
"@hpke/core": "jsr:@hpke/core@^1.2.9",
78
"@std/assert": "jsr:@std/[email protected]",
89
"@std/testing": "jsr:@std/testing@^1.0.0"
910
},
11+
"publish": {
12+
"exclude": [
13+
"dnt.ts",
14+
"samples/",
15+
"test/"
16+
]
17+
},
1018
"fmt": {
1119
"include": [
1220
"README.md",

x/chacha20poly1305/deno.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x/chacha20poly1305/dnt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ await build({
99
test: true,
1010
declaration: true,
1111
scriptModule: "umd",
12-
importMap: "./deno.json",
12+
importMap: "../../import_map_for_dnt.json",
1313
compilerOptions: {
1414
lib: ["es2022", "dom"],
1515
},

x/chacha20poly1305/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Chacha20Poly1305 } from "../../src/aeads/chacha20Poly1305.ts";
1+
export { Chacha20Poly1305 } from "./src/chacha20Poly1305.ts";

0 commit comments

Comments
 (0)