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

@hpke/chacha20poly1305

Package Overview
Dependencies
Maintainers
1
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.0.1 to 1.0.2

22

esm/src/aeads/chacha20Poly1305.d.ts

@@ -14,2 +14,24 @@ import type { AeadEncryptionContext } from "../interfaces/aeadEncryptionContext.js";

}
/**
* The ChaCha20Poly1305 AEAD.
*
* @remarks
*
* This class is implemented using
* {@link https://github.com/paulmillr/noble-ciphers | @noble/ciphers}.
*
* The instance of this class can be specified to the
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuiteParams | CipherSuiteParams} as follows:
*
* @example
* ```ts
* import { KemId, KdfId, CipherSuite } from "http://deno.land/x/hpke/core/mod.ts";
* import { Chacha20Poly1305 } from "https://deno.land/x/hpke/x/chach20poly1305/mod.ts";
* const suite = new CipherSuite({
* kem: KemId.DhkemP256HkdfSha256,
* kdf: KdfId.HkdfSha256,
* aead: new Chacha20Poly1305(),
* });
* ```
*/
export declare class Chacha20Poly1305 extends Algorithm implements AeadInterface {

@@ -16,0 +38,0 @@ readonly id: AeadId;

@@ -41,2 +41,24 @@ // @ts-ignore: for "npm:"

}
/**
* The ChaCha20Poly1305 AEAD.
*
* @remarks
*
* This class is implemented using
* {@link https://github.com/paulmillr/noble-ciphers | @noble/ciphers}.
*
* The instance of this class can be specified to the
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuiteParams | CipherSuiteParams} as follows:
*
* @example
* ```ts
* import { KemId, KdfId, CipherSuite } from "http://deno.land/x/hpke/core/mod.ts";
* import { Chacha20Poly1305 } from "https://deno.land/x/hpke/x/chach20poly1305/mod.ts";
* const suite = new CipherSuite({
* kem: KemId.DhkemP256HkdfSha256,
* kdf: KdfId.HkdfSha256,
* aead: new Chacha20Poly1305(),
* });
* ```
*/
export class Chacha20Poly1305 extends Algorithm {

@@ -43,0 +65,0 @@ constructor() {

36

esm/src/identifiers.d.ts

@@ -10,5 +10,8 @@ /**

};
/**
* The type of the Supported HPKE modes.
*/
export type Mode = typeof Mode[keyof typeof Mode];
/**
* Supported Key Encapsulation Mechanisms (KEMs).
* Supported Key Encapsulation Mechanism (KEM) identifiers.
*

@@ -25,2 +28,7 @@ * @deprecated Use {@link KdfId} instead.

};
/**
* The type of the supported KEM identifiers.
*
* @deprecated Use {@link KdfId} instead.
*/
export type Kem = typeof Kem[keyof typeof Kem];

@@ -38,5 +46,8 @@ /**

};
/**
* The type of the supported KEM identifiers.
*/
export type KemId = typeof KemId[keyof typeof KemId];
/**
* Supported Key Derivation Functions (KDFs).
* Supported Key Derivation Function (KDF) identifiers.
*

@@ -50,2 +61,7 @@ * @deprecated Use {@link KdfId} instead.

};
/**
* The type of the supported KDF identifiers.
*
* @deprecated Use {@link KdfId} instead.
*/
export type Kdf = typeof Kdf[keyof typeof Kdf];

@@ -60,5 +76,8 @@ /**

};
/**
* The type of the supported KDF identifiers.
*/
export type KdfId = typeof KdfId[keyof typeof KdfId];
/**
* Supported Authenticated Encryption with Associated Data (AEAD) Functions.
* Supported Authenticated Encryption with Associated Data (AEAD) identifiers.
*

@@ -74,4 +93,10 @@ * @deprecated Use {@link AeadId} instead.

/**
* Supported Authenticated Encryption with Associated Data (AEAD) function identifiers.
* The type of the supported AEAD identifiers.
*
* @deprecated Use {@link AeadId} instead.
*/
export type Aead = typeof Aead[keyof typeof Aead];
/**
* Supported Authenticated Encryption with Associated Data (AEAD) identifiers.
*/
export declare const AeadId: {

@@ -83,2 +108,5 @@ readonly Aes128Gcm: 1;

};
/**
* The type of the supported AEAD identifiers.
*/
export type AeadId = typeof AeadId[keyof typeof AeadId];

8

esm/src/identifiers.js

@@ -11,3 +11,3 @@ /**

/**
* Supported Key Encapsulation Mechanisms (KEMs).
* Supported Key Encapsulation Mechanism (KEM) identifiers.
*

@@ -29,3 +29,3 @@ * @deprecated Use {@link KdfId} instead.

/**
* Supported Key Derivation Functions (KDFs).
* Supported Key Derivation Function (KDF) identifiers.
*

@@ -44,3 +44,3 @@ * @deprecated Use {@link KdfId} instead.

/**
* Supported Authenticated Encryption with Associated Data (AEAD) Functions.
* Supported Authenticated Encryption with Associated Data (AEAD) identifiers.
*

@@ -56,4 +56,4 @@ * @deprecated Use {@link AeadId} instead.

/**
* Supported Authenticated Encryption with Associated Data (AEAD) function identifiers.
* Supported Authenticated Encryption with Associated Data (AEAD) identifiers.
*/
export const AeadId = Aead;

@@ -6,3 +6,3 @@ {

"name": "@hpke/chacha20poly1305",
"version": "1.0.1",
"version": "1.0.2",
"description": "A Hybrid Public Key Encryption (HPKE) module extension for ChaCha20/Poly1305",

@@ -9,0 +9,0 @@ "repository": {

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

[Doc(deno.land)](https://doc.deno.land/https://deno.land/x/hpke/x/chacha20poly1305/mod.ts)/[Doc(pages, only for the latest version)](https://dajiaji.github.io/hpke-js/chacha20poly1305/docs/)
Documentation: [deno.land](https://doc.deno.land/https://deno.land/x/hpke/x/chacha20poly1305/mod.ts) | [pages(only for the latest ver.)](https://dajiaji.github.io/hpke-js/chacha20poly1305/docs/)

@@ -35,4 +35,4 @@ </div>

<script type="module">
import * as hpke from "https://esm.sh/@hpke/core@1.0.1";
import * as chacha20 from "https://esm.sh/@hpke/chacha20poly1305@1.0.1";
import * as hpke from "https://esm.sh/@hpke/core@1.0.2";
import * as chacha20 from "https://esm.sh/@hpke/chacha20poly1305@1.0.2";
// ...

@@ -54,4 +54,4 @@ </script>

<script type="module">
import * as hpke from "https://unpkg.com/@hpke/core@1.0.1/esm/mod.js";
import * as chacha20 from "https://unpkg.com/@hpke/chacha20poly1305@1.0.1/esm/mod.js";
import * as hpke from "https://unpkg.com/@hpke/core@1.0.2/esm/mod.js";
import * as chacha20 from "https://unpkg.com/@hpke/chacha20poly1305@1.0.2/esm/mod.js";
// ...

@@ -81,4 +81,4 @@ </script>

// use a specific version
import * as hpke from "https://deno.land/x/hpke@1.0.1/core/mod.ts";
import * as chacha20 from "https://deno.land/x/hpke@1.0.1/x/chacha20poly1305/mod.ts";
import * as hpke from "https://deno.land/x/hpke@1.0.2/core/mod.ts";
import * as chacha20 from "https://deno.land/x/hpke@1.0.2/x/chacha20poly1305/mod.ts";

@@ -111,5 +111,5 @@ // use the latest stable version

<script type="module">
// import * as hpke from "https://esm.sh/hpke-js@1.0.1";
import { KemId, KdfId, CipherSuite } from "https://esm.sh/@hpke/core@1.0.1";
import { Chacha20Poly1305 } from "https://esm.sh/@hpke/chacha20poly1305@1.0.1";
// import * as hpke from "https://esm.sh/hpke-js@1.0.2";
import { KemId, KdfId, CipherSuite } from "https://esm.sh/@hpke/core@1.0.2";
import { Chacha20Poly1305 } from "https://esm.sh/@hpke/chacha20poly1305@1.0.2";

@@ -201,4 +201,4 @@ globalThis.doHpke = async () => {

```js
import { KemId, KdfId, CipherSuite } from "https://deno.land/x/hpke@1.0.1/core/mod.ts";
import { Chacha20Poly1305 } from "https://deno.land/x/hpke@1.0.1/x/chacha20poly1305/mod.ts";
import { KemId, KdfId, CipherSuite } from "https://deno.land/x/hpke@1.0.2/core/mod.ts";
import { Chacha20Poly1305 } from "https://deno.land/x/hpke@1.0.2/x/chacha20poly1305/mod.ts";

@@ -205,0 +205,0 @@ async function doHpke() {

@@ -14,2 +14,24 @@ import type { AeadEncryptionContext } from "../interfaces/aeadEncryptionContext.js";

}
/**
* The ChaCha20Poly1305 AEAD.
*
* @remarks
*
* This class is implemented using
* {@link https://github.com/paulmillr/noble-ciphers | @noble/ciphers}.
*
* The instance of this class can be specified to the
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuiteParams | CipherSuiteParams} as follows:
*
* @example
* ```ts
* import { KemId, KdfId, CipherSuite } from "http://deno.land/x/hpke/core/mod.ts";
* import { Chacha20Poly1305 } from "https://deno.land/x/hpke/x/chach20poly1305/mod.ts";
* const suite = new CipherSuite({
* kem: KemId.DhkemP256HkdfSha256,
* kdf: KdfId.HkdfSha256,
* aead: new Chacha20Poly1305(),
* });
* ```
*/
export declare class Chacha20Poly1305 extends Algorithm implements AeadInterface {

@@ -16,0 +38,0 @@ readonly id: AeadId;

@@ -54,2 +54,24 @@ (function (factory) {

exports.Chacha20Poly1305Context = Chacha20Poly1305Context;
/**
* The ChaCha20Poly1305 AEAD.
*
* @remarks
*
* This class is implemented using
* {@link https://github.com/paulmillr/noble-ciphers | @noble/ciphers}.
*
* The instance of this class can be specified to the
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuiteParams | CipherSuiteParams} as follows:
*
* @example
* ```ts
* import { KemId, KdfId, CipherSuite } from "http://deno.land/x/hpke/core/mod.ts";
* import { Chacha20Poly1305 } from "https://deno.land/x/hpke/x/chach20poly1305/mod.ts";
* const suite = new CipherSuite({
* kem: KemId.DhkemP256HkdfSha256,
* kdf: KdfId.HkdfSha256,
* aead: new Chacha20Poly1305(),
* });
* ```
*/
class Chacha20Poly1305 extends algorithm_js_1.Algorithm {

@@ -56,0 +78,0 @@ constructor() {

@@ -10,5 +10,8 @@ /**

};
/**
* The type of the Supported HPKE modes.
*/
export type Mode = typeof Mode[keyof typeof Mode];
/**
* Supported Key Encapsulation Mechanisms (KEMs).
* Supported Key Encapsulation Mechanism (KEM) identifiers.
*

@@ -25,2 +28,7 @@ * @deprecated Use {@link KdfId} instead.

};
/**
* The type of the supported KEM identifiers.
*
* @deprecated Use {@link KdfId} instead.
*/
export type Kem = typeof Kem[keyof typeof Kem];

@@ -38,5 +46,8 @@ /**

};
/**
* The type of the supported KEM identifiers.
*/
export type KemId = typeof KemId[keyof typeof KemId];
/**
* Supported Key Derivation Functions (KDFs).
* Supported Key Derivation Function (KDF) identifiers.
*

@@ -50,2 +61,7 @@ * @deprecated Use {@link KdfId} instead.

};
/**
* The type of the supported KDF identifiers.
*
* @deprecated Use {@link KdfId} instead.
*/
export type Kdf = typeof Kdf[keyof typeof Kdf];

@@ -60,5 +76,8 @@ /**

};
/**
* The type of the supported KDF identifiers.
*/
export type KdfId = typeof KdfId[keyof typeof KdfId];
/**
* Supported Authenticated Encryption with Associated Data (AEAD) Functions.
* Supported Authenticated Encryption with Associated Data (AEAD) identifiers.
*

@@ -74,4 +93,10 @@ * @deprecated Use {@link AeadId} instead.

/**
* Supported Authenticated Encryption with Associated Data (AEAD) function identifiers.
* The type of the supported AEAD identifiers.
*
* @deprecated Use {@link AeadId} instead.
*/
export type Aead = typeof Aead[keyof typeof Aead];
/**
* Supported Authenticated Encryption with Associated Data (AEAD) identifiers.
*/
export declare const AeadId: {

@@ -83,2 +108,5 @@ readonly Aes128Gcm: 1;

};
/**
* The type of the supported AEAD identifiers.
*/
export type AeadId = typeof AeadId[keyof typeof AeadId];

@@ -23,3 +23,3 @@ (function (factory) {

/**
* Supported Key Encapsulation Mechanisms (KEMs).
* Supported Key Encapsulation Mechanism (KEM) identifiers.
*

@@ -41,3 +41,3 @@ * @deprecated Use {@link KdfId} instead.

/**
* Supported Key Derivation Functions (KDFs).
* Supported Key Derivation Function (KDF) identifiers.
*

@@ -56,3 +56,3 @@ * @deprecated Use {@link KdfId} instead.

/**
* Supported Authenticated Encryption with Associated Data (AEAD) Functions.
* Supported Authenticated Encryption with Associated Data (AEAD) identifiers.
*

@@ -68,5 +68,5 @@ * @deprecated Use {@link AeadId} instead.

/**
* Supported Authenticated Encryption with Associated Data (AEAD) function identifiers.
* Supported Authenticated Encryption with Associated Data (AEAD) identifiers.
*/
exports.AeadId = exports.Aead;
});
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