Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce package.json for npm dependencies. #179

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ This module works on web browsers, Node.js, Deno and Cloudflare Workers.
| ChaCha20Poly1305 | ✅\*4<br> | ✅\*4<br> | ✅\*4<br> | ✅\*4<br> | ✅\*4<br> |
| Export Only | ✅<br> | ✅<br> | ✅<br> | ✅<br> | ✅<br> |

- \*4: [@noble/ciphers/chacha](https://github.com/paulmillr/noble-ciphers) is used.
- \*4: [@noble/ciphers/chacha](https://github.com/paulmillr/noble-ciphers) is
used.

## Supported Environments

Expand Down
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "hpke-js",
"description":
"A Hybrid Public Key Encryption (HPKE) module for various JavaScript runtimes",
"type": "module",
"dependencies": {
"@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1",
"@noble/ciphers": "^0.1.4"
}
}
2 changes: 1 addition & 1 deletion src/aeadKeys/chacha20Poly1305Key.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { chacha20_poly1305 } from "npm:@noble/ciphers@0.1.4/chacha";
import { chacha20_poly1305 } from "npm:@noble/ciphers/chacha";

import type { AeadKey } from "../interfaces/aeadKey.ts";

Expand Down
6 changes: 3 additions & 3 deletions src/kdfs/hkdf.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { hmac } from "npm:@noble/hashes@1.3.1/hmac";
import { sha256 } from "npm:@noble/hashes@1.3.1/sha256";
import { sha384, sha512 } from "npm:@noble/hashes@1.3.1/sha512";
import { hmac } from "npm:@noble/hashes/hmac";
import { sha256 } from "npm:@noble/hashes/sha256";
import { sha384, sha512 } from "npm:@noble/hashes/sha512";

import type { KdfInterface } from "../interfaces/kdfInterface.ts";

Expand Down
2 changes: 1 addition & 1 deletion src/kems/dhkemPrimitives/x25519.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ed25519, x25519 } from "npm:@noble/curves@1.1.0/ed25519";
import { ed25519, x25519 } from "npm:@noble/curves/ed25519";

import type { KemPrimitives } from "../../interfaces/kemPrimitives.ts";
import type { KdfInterface } from "../../interfaces/kdfInterface.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/kems/dhkemPrimitives/x448.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ed448, x448 } from "npm:@noble/curves@1.1.0/ed448";
import { ed448, x448 } from "npm:@noble/curves/ed448";

import type { KemPrimitives } from "../../interfaces/kemPrimitives.ts";
import type { KdfInterface } from "../../interfaces/kdfInterface.ts";
Expand Down
Loading