Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hpke/chacha20poly1305

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hpke/chacha20poly1305 - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

esm/deps/jsr.io/@std/internal/1.0.3/build_message.d.ts.map

4

package.json
{
"name": "@hpke/chacha20poly1305",
"version": "1.5.0",
"version": "1.6.0",
"description": "A Hybrid Public Key Encryption (HPKE) module extension for ChaCha20/Poly1305",

@@ -43,3 +43,3 @@ "keywords": [

"@hpke/common": "^1.4.3",
"@noble/ciphers": "^0.5.3"
"@noble/ciphers": "^1.0.0"
},

@@ -46,0 +46,0 @@ "devDependencies": {

@@ -24,3 +24,2 @@ <h1 align="center">@hpke/chacha20poly1305</h1>

- [Web Browsers](#web-browsers)
- [Cloudflare Workers](#cloudflare-workers)
- [Usage](#usage)

@@ -31,31 +30,24 @@ - [Contributing](#contributing)

`@hpke/chacha20poly1305` need to be used with
[@hpke/core](https://github.com/dajiaji/hpke-js/blob/main/packages/core/README.md),
which can be installed in the same manner as desribed below.
### Node.js
Using npm:
You can install the package with npm, yarn or pnpm.
```sh
# Using npm:
npm install @hpke/chacha20poly1305
```
Using yarn:
```sh
yarn add @hpke/chacha20poly1305
pnpm install @hpke/chacha20poly1305
# Using jsr:
npx jsr add @hpke/chacha20poly1305
yarn dlx jsr add @hpke/chacha20poly1305
pnpm dlx jsr add @hpke/chacha20poly1305
```
### Deno
The above manner can be used with other JavaScript runtimes that support npm,
such as Cloudflare Workers and Bun.
Starting from version 1.3.0, hpke-js packages are available from the JSR
registry. From this version onwards, please use JSR import instead of HTTPS
import in Deno.
**JSR imoprt (recommended on `>=1.3.0`):**
Add hpke-js packages using the commands below:
```sh
deno add @hpke/core
deno add @hpke/chacha20poly1305
```
Then, you can use the module from code like this:

@@ -68,11 +60,8 @@

**HTTPS imoprt (deprecated):**
### Deno
```ts
import {
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "https://deno.land/x/hpke/core/mod.ts";
import { Chacha20Poly1305 } from "https://deno.land/x/hpke/x/chacha20poly1305/mod.ts";
For Deno, it is recommended to use the jsr.io registry.
```sh
deno add jsr:@hpke/chacha20poly1305
```

@@ -90,4 +79,8 @@

<script type="module">
import * as hpke from "https://esm.sh/@hpke/core@<SEMVER>";
import * as chacha20 from "https://esm.sh/@hpke/chacha20poly1305@<SEMVER>";
import {
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "https://esm.sh/@hpke/core@<SEMVER>";
import { Chacha20Poly1305 } from "https://esm.sh/@hpke/chacha20poly1305@<SEMVER>";
// ...

@@ -98,4 +91,8 @@ </script>

<script type="module">
import * as hpke from "https://esm.sh/@hpke/core";
import * as chacha20 from "https://esm.sh/@hpke/chacha20poly1305";
import {
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "https://esm.sh/@hpke/core";
import { Chacha20Poly1305 } from "https://esm.sh/@hpke/chacha20poly1305";
// ...

@@ -110,4 +107,8 @@ </script>

<script type="module">
import * as hpke from "https://unpkg.com/@hpke/core@<SEMVER>/esm/mod.js";
import * as chacha20 from "https://unpkg.com/@hpke/chacha20poly1305@<SEMVER>/esm/mod.js";
import {
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "https://unpkg.com/@hpke/core@<SEMVER>/esm/mod.js";
import { Chacha20Poly1305 } from "https://unpkg.com/@hpke/chacha20poly1305@<SEMVER>/esm/mod.js";
// ...

@@ -117,12 +118,2 @@ </script>

### Cloudflare Workers
```sh
git clone git@github.com:dajiaji/hpke-js.git
cd hpke-js/x/chacha20poly1305
npm install -g esbuild
deno task dnt
deno task minify > $YOUR_SRC_PATH/hpke-chacha20poly1305.js
```
## Usage

@@ -217,3 +208,3 @@

### Browsers
### Web Browsers

@@ -230,4 +221,4 @@ ```html

HkdfSha256,
} from "https://esm.sh/@hpke/core@<SEMVER>";
import { Chacha20Poly1305 } from "https://esm.sh/@hpke/chacha20poly1305@<SEMVER>";
} from "https://esm.sh/@hpke/core";
import { Chacha20Poly1305 } from "https://esm.sh/@hpke/chacha20poly1305";

@@ -234,0 +225,0 @@ globalThis.doHpke = async () => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc