@chainsafe/libp2p-noise
Advanced tools
Comparing version 13.0.4 to 13.0.5
@@ -9,4 +9,4 @@ import type { bytes } from './basic.js'; | ||
remoteExtensions: NoiseExtensions; | ||
encrypt: (plaintext: bytes, session: NoiseSession) => bytes; | ||
decrypt: (ciphertext: bytes, session: NoiseSession, dst?: Uint8Array) => { | ||
encrypt(plaintext: bytes, session: NoiseSession): bytes; | ||
decrypt(ciphertext: bytes, session: NoiseSession, dst?: Uint8Array): { | ||
plaintext: bytes; | ||
@@ -13,0 +13,0 @@ valid: boolean; |
@@ -5,10 +5,10 @@ import type { bytes32, bytes } from './@types/basic.js'; | ||
export interface ICryptoInterface { | ||
hashSHA256: (data: Uint8Array) => Uint8Array; | ||
getHKDF: (ck: bytes32, ikm: Uint8Array) => Hkdf; | ||
generateX25519KeyPair: () => KeyPair; | ||
generateX25519KeyPairFromSeed: (seed: Uint8Array) => KeyPair; | ||
generateX25519SharedKey: (privateKey: Uint8Array, publicKey: Uint8Array) => Uint8Array; | ||
chaCha20Poly1305Encrypt: (plaintext: Uint8Array, nonce: Uint8Array, ad: Uint8Array, k: bytes32) => bytes; | ||
chaCha20Poly1305Decrypt: (ciphertext: Uint8Array, nonce: Uint8Array, ad: Uint8Array, k: bytes32, dst?: Uint8Array) => bytes | null; | ||
hashSHA256(data: Uint8Array): Uint8Array; | ||
getHKDF(ck: bytes32, ikm: Uint8Array): Hkdf; | ||
generateX25519KeyPair(): KeyPair; | ||
generateX25519KeyPairFromSeed(seed: Uint8Array): KeyPair; | ||
generateX25519SharedKey(privateKey: Uint8Array, publicKey: Uint8Array): Uint8Array; | ||
chaCha20Poly1305Encrypt(plaintext: Uint8Array, nonce: Uint8Array, ad: Uint8Array, k: bytes32): bytes; | ||
chaCha20Poly1305Decrypt(ciphertext: Uint8Array, nonce: Uint8Array, ad: Uint8Array, k: bytes32, dst?: Uint8Array): bytes | null; | ||
} | ||
//# sourceMappingURL=crypto.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const defaultCrypto: import("..").ICryptoInterface; | ||
export declare const defaultCrypto: import("../crypto.js").ICryptoInterface; | ||
//# sourceMappingURL=index.browser.d.ts.map |
@@ -1,3 +0,3 @@ | ||
import { pureJsCrypto } from './js'; | ||
import { pureJsCrypto } from './js.js'; | ||
export const defaultCrypto = pureJsCrypto; | ||
//# sourceMappingURL=index.browser.js.map |
{ | ||
"name": "@chainsafe/libp2p-noise", | ||
"version": "13.0.4", | ||
"version": "13.0.5", | ||
"author": "ChainSafe <info@chainsafe.io>", | ||
@@ -101,3 +101,3 @@ "license": "Apache-2.0 OR MIT", | ||
"@types/sinon": "^17.0.1", | ||
"aegir": "^40.0.8", | ||
"aegir": "^41.1.10", | ||
"benchmark": "^2.1.4", | ||
@@ -104,0 +104,0 @@ "execa": "^8.0.1", |
@@ -10,4 +10,4 @@ import type { bytes } from './basic.js' | ||
remoteExtensions: NoiseExtensions | ||
encrypt: (plaintext: bytes, session: NoiseSession) => bytes | ||
decrypt: (ciphertext: bytes, session: NoiseSession, dst?: Uint8Array) => { plaintext: bytes, valid: boolean } | ||
encrypt(plaintext: bytes, session: NoiseSession): bytes | ||
decrypt(ciphertext: bytes, session: NoiseSession, dst?: Uint8Array): { plaintext: bytes, valid: boolean } | ||
} |
@@ -6,12 +6,12 @@ import type { bytes32, bytes } from './@types/basic.js' | ||
export interface ICryptoInterface { | ||
hashSHA256: (data: Uint8Array) => Uint8Array | ||
hashSHA256(data: Uint8Array): Uint8Array | ||
getHKDF: (ck: bytes32, ikm: Uint8Array) => Hkdf | ||
getHKDF(ck: bytes32, ikm: Uint8Array): Hkdf | ||
generateX25519KeyPair: () => KeyPair | ||
generateX25519KeyPairFromSeed: (seed: Uint8Array) => KeyPair | ||
generateX25519SharedKey: (privateKey: Uint8Array, publicKey: Uint8Array) => Uint8Array | ||
generateX25519KeyPair(): KeyPair | ||
generateX25519KeyPairFromSeed(seed: Uint8Array): KeyPair | ||
generateX25519SharedKey(privateKey: Uint8Array, publicKey: Uint8Array): Uint8Array | ||
chaCha20Poly1305Encrypt: (plaintext: Uint8Array, nonce: Uint8Array, ad: Uint8Array, k: bytes32) => bytes | ||
chaCha20Poly1305Decrypt: (ciphertext: Uint8Array, nonce: Uint8Array, ad: Uint8Array, k: bytes32, dst?: Uint8Array) => bytes | null | ||
chaCha20Poly1305Encrypt(plaintext: Uint8Array, nonce: Uint8Array, ad: Uint8Array, k: bytes32): bytes | ||
chaCha20Poly1305Decrypt(ciphertext: Uint8Array, nonce: Uint8Array, ad: Uint8Array, k: bytes32, dst?: Uint8Array): bytes | null | ||
} |
@@ -1,3 +0,3 @@ | ||
import { pureJsCrypto } from './js' | ||
import { pureJsCrypto } from './js.js' | ||
export const defaultCrypto = pureJsCrypto |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
475629