Skip to content

Commit

Permalink
Merge pull request #195 from dajiaji/bump-to_0_21_0
Browse files Browse the repository at this point in the history
Bump version up to 0.21.0.
  • Loading branch information
dajiaji authored Jul 25, 2023
2 parents c36c0ec + 72a1979 commit f1c5dc7
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 48 deletions.
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changes

## Version 0.21.0

Released 2023-07-25

- [(#194) Expose AEAD Classes for CipherSuiteParams.](https://github.com/dajiaji/hpke-js/pull/194)
- [(#193) Add AeadInterface for CipherSuiteParams.](https://github.com/dajiaji/hpke-js/pull/193)
- [(#192) Add mod.ts to formatter/linter targets.](https://github.com/dajiaji/hpke-js/pull/192)
- [(#191) Update CipherSuiteParameters to make Kem/KdfInterface to be set instead of Kem/KdfId.](https://github.com/dajiaji/hpke-js/pull/191)
- [(#190) Introduce union type algorithm identifier.](https://github.com/dajiaji/hpke-js/pull/190)
- [(#189) Add support for Node.js 20.](https://github.com/dajiaji/hpke-js/pull/189)

## Version 0.20.0

Released 2023-07-19
Expand Down
88 changes: 44 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ This module works on web browsers, Node.js, Deno and Cloudflare Workers.
- **Node.js**: 16.x, 17.x, 18.x, 19.x, 20.x
- **Deno**: 1.x (1.15-)
- **Cloudflare Workers**
- **bun**
- **bun**: 0.x (0.3.0-)

## Warnings and Restrictions

Expand All @@ -125,7 +125,7 @@ Using esm.sh:
```html
<!-- use a specific version -->
<script type="module">
import * as hpke from "https://esm.sh/hpke-js@0.20.0";
import * as hpke from "https://esm.sh/hpke-js@0.21.0";
// ...
</script>

Expand All @@ -141,7 +141,7 @@ Using unpkg:
```html
<!-- use a specific version -->
<script type="module">
import * as hpke from "https://unpkg.com/hpke-js@0.20.0/esm/mod.js";
import * as hpke from "https://unpkg.com/hpke-js@0.21.0/esm/mod.js";
// ...
</script>
```
Expand All @@ -166,7 +166,7 @@ Using deno.land:

```js
// use a specific version
import * as hpke from "https://deno.land/x/hpke@0.20.0/mod.ts";
import * as hpke from "https://deno.land/x/hpke@0.21.0/mod.ts";

// use the latest stable version
import * as hpke from "https://deno.land/x/hpke/mod.ts";
Expand All @@ -177,15 +177,15 @@ import * as hpke from "https://deno.land/x/hpke/mod.ts";
Downloads a single js file from esm.sh:

```sh
curl -sS -o $YOUR_SRC_PATH/hpke.js https://esm.sh/v86/hpke-js@0.20.0/es2022/hpke-js.js
curl -sS -o $YOUR_SRC_PATH/hpke.js https://esm.sh/v86/hpke-js@0.21.0/es2022/hpke-js.js
# if you want to use a minified version:
curl -sS -o $YOUR_SRC_PATH/hpke.min.js https://esm.sh/v86/hpke-js@0.20.0/es2022/hpke.min.js
curl -sS -o $YOUR_SRC_PATH/hpke.min.js https://esm.sh/v86/hpke-js@0.21.0/es2022/hpke.min.js
```

Emits a single js file by using `deno bundle`:

```sh
deno bundle https://deno.land/x/hpke@0.20.0/mod.ts > $YOUR_SRC_PATH/hpke.js
deno bundle https://deno.land/x/hpke@0.21.0/mod.ts > $YOUR_SRC_PATH/hpke.js
```

## Usage
Expand All @@ -201,15 +201,15 @@ Browsers:
<head></head>
<body>
<script type="module">
// import * as hpke from "https://esm.sh/hpke-js@0.20.0";
import { Kem, Kdf, Aead, CipherSuite } from "https://esm.sh/hpke-js@0.20.0";
// import * as hpke from "https://esm.sh/hpke-js@0.21.0";
import { KemId, KdfId, AeadId, CipherSuite } from "https://esm.sh/hpke-js@0.21.0";
globalThis.doHpke = async () => {
const suite = new CipherSuite({
kem: Kem.DhkemP256HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.Aes128Gcm
kem: KemId.DhkemP256HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm
});
const rkp = await suite.generateKeyPair();
Expand Down Expand Up @@ -277,14 +277,14 @@ Browsers:
Node.js:

```js
const { Kem, Kdf, Aead, CipherSuite } = require("hpke-js");
const { KemId, KdfId, AeadId, CipherSuite } = require("hpke-js");

async function doHpke() {
// setup
const suite = new CipherSuite({
kem: Kem.DhkemP256HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.Aes128Gcm,
kem: KemId.DhkemP256HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm,
});

const rkp = await suite.generateKeyPair();
Expand Down Expand Up @@ -318,14 +318,14 @@ doHpke();
Deno:

```js
import { Kem, Kdf, Aead, CipherSuite } from "https://deno.land/x/hpke@0.20.0/mod.ts";
import { KemId, KdfId, AeadId, CipherSuite } from "https://deno.land/x/hpke@0.21.0/mod.ts";

async function doHpke() {
// setup
const suite = new CipherSuite({
kem: Kem.DhkemX25519HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.Aes128Gcm,
kem: KemId.DhkemX25519HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm,
});

const rkp = await suite.generateKeyPair();
Expand Down Expand Up @@ -361,15 +361,15 @@ doHpke();
Node.js:

```js
const { Kem, Kdf, Aead, CipherSuite } = require('hpke-js');
const { KemId, KdfId, AeadId, CipherSuite } = require('hpke-js');

async function doHpke() {

// setup
const suite = new CipherSuite({
kem: Kem.DhkemP256HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.Aes128Gcm
kem: KemId.DhkemP256HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm
});

const rkp = await suite.generateKeyPair();
Expand Down Expand Up @@ -397,17 +397,17 @@ doHpke();
Node.js:

```js
const { Kem, Kdf, Aead, CipherSuite } = require("hpke-js");
const { KemId, KdfId, AeadId, CipherSuite } = require("hpke-js");

const te = new TextEncoder();
const td = new TextDecoder();

async function doHpke() {
// setup
const suite = new CipherSuite({
kem: Kem.DhkemP256HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.Aes128Gcm,
kem: KemId.DhkemP256HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm,
});
const rkp = await suite.generateKeyPair();

Expand Down Expand Up @@ -465,14 +465,14 @@ doHpke();
Node.js:

```js
const { Kem, Kdf, Aead, CipherSuite } = require("hpke-js");
const { KemId, KdfId, AeadId, CipherSuite } = require("hpke-js");

async function doHpke() {
// setup
const suite = new CipherSuite({
kem: Kem.DhkemP256HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.ExportOnly,
kem: KemId.DhkemP256HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.ExportOnly,
});

const rkp = await suite.generateKeyPair();
Expand Down Expand Up @@ -502,14 +502,14 @@ doHpke();
Node.js:

```js
const { Kem, Kdf, Aead, CipherSuite } = require("hpke-js");
const { KemId, KdfId, AeadId, CipherSuite } = require("hpke-js");

async function doHpke() {
// setup
const suite = new CipherSuite({
kem: Kem.DhkemP256HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.Aes128Gcm,
kem: KemId.DhkemP256HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm,
});

const rkp = await suite.generateKeyPair();
Expand Down Expand Up @@ -555,14 +555,14 @@ doHpke();
Node.js:

```js
const { Kem, Kdf, Aead, CipherSuite } = require("hpke-js");
const { KemId, KdfId, AeadId, CipherSuite } = require("hpke-js");

async function doHpke() {
// setup
const suite = new CipherSuite({
kem: Kem.DhkemP256HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.Aes128Gcm,
kem: KemId.DhkemP256HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm,
});

const rkp = await suite.generateKeyPair();
Expand Down Expand Up @@ -601,14 +601,14 @@ doHpke();
Node.js:

```js
const { Kem, Kdf, Aead, CipherSuite } = require("hpke-js");
const { KemId, KdfId, AeadId, CipherSuite } = require("hpke-js");

async function doHpke() {
// setup
const suite = new CipherSuite({
kem: Kem.DhkemP256HkdfSha256,
kdf: Kdf.HkdfSha256,
aead: Aead.Aes128Gcm,
kem: KemId.DhkemP256HkdfSha256,
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm,
});

const rkp = await suite.generateKeyPair();
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

| Version | Supported |
| ------- | ------------------ |
| 0.20.x | :white_check_mark: |
| < 0.20 | :x: |
| 0.21.x | :white_check_mark: |
| < 0.21 | :x: |

## Reporting a Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion samples/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"author": "Ajitomi Daisuke <[email protected]> (https://github.com/dajiaji)",
"license": "MIT",
"dependencies": {
"hpke-js": "^0.20.0"
"hpke-js": "^0.21.0"
}
}
2 changes: 1 addition & 1 deletion samples/ts-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Ajitomi Daisuke <[email protected]> (https://github.com/dajiaji)",
"license": "MIT",
"dependencies": {
"hpke-js": "^0.20.0",
"hpke-js": "^0.21.0",
"ts-node": "^10.7.0"
}
}

0 comments on commit f1c5dc7

Please sign in to comment.