nostr-tools
Advanced tools
Comparing version 2.1.9 to 2.2.0
@@ -48,3 +48,3 @@ "use strict"; | ||
let n = 2 ** logn; | ||
let key = (0, import_scrypt.scrypt)(password, salt, { N: n, r: 8, p: 1, dkLen: 32 }); | ||
let key = (0, import_scrypt.scrypt)(password.normalize("NFKC"), salt, { N: n, r: 8, p: 1, dkLen: 32 }); | ||
let nonce = (0, import_utils2.randomBytes)(24); | ||
@@ -74,3 +74,3 @@ let aad = Uint8Array.from([ksb]); | ||
let ciphertext = b.slice(2 + 16 + 24 + 1); | ||
let key = (0, import_scrypt.scrypt)(password, salt, { N: n, r: 8, p: 1, dkLen: 32 }); | ||
let key = (0, import_scrypt.scrypt)(password.normalize("NFKC"), salt, { N: n, r: 8, p: 1, dkLen: 32 }); | ||
let xc2p1 = (0, import_chacha.xchacha20poly1305)(key, nonce, aad); | ||
@@ -77,0 +77,0 @@ let sec = xc2p1.decrypt(ciphertext); |
@@ -23,3 +23,3 @@ // nip49.ts | ||
let n = 2 ** logn; | ||
let key = scrypt(password, salt, { N: n, r: 8, p: 1, dkLen: 32 }); | ||
let key = scrypt(password.normalize("NFKC"), salt, { N: n, r: 8, p: 1, dkLen: 32 }); | ||
let nonce = randomBytes(24); | ||
@@ -49,3 +49,3 @@ let aad = Uint8Array.from([ksb]); | ||
let ciphertext = b.slice(2 + 16 + 24 + 1); | ||
let key = scrypt(password, salt, { N: n, r: 8, p: 1, dkLen: 32 }); | ||
let key = scrypt(password.normalize("NFKC"), salt, { N: n, r: 8, p: 1, dkLen: 32 }); | ||
let xc2p1 = xchacha20poly1305(key, nonce, aad); | ||
@@ -52,0 +52,0 @@ let sec = xc2p1.decrypt(ciphertext); |
@@ -0,2 +1,5 @@ | ||
/// <reference types="mock-socket/index" /> | ||
import { WebSocket } from 'mock-socket'; | ||
import { type Event } from './pure.ts'; | ||
export declare const MockWebSocketClient: typeof WebSocket; | ||
export declare function buildEvent(params: Partial<Event>): Event; | ||
@@ -3,0 +6,0 @@ export declare class MockRelay { |
{ | ||
"type": "module", | ||
"name": "nostr-tools", | ||
"version": "2.1.9", | ||
"version": "2.2.0", | ||
"description": "Tools for making a Nostr client.", | ||
@@ -173,2 +173,7 @@ "repository": { | ||
}, | ||
"./nip75": { | ||
"import": "./lib/esm/nip75.js", | ||
"require": "./lib/cjs/nip75.js", | ||
"types": "./lib/types/nip75.d.ts" | ||
}, | ||
"./nip94": { | ||
@@ -175,0 +180,0 @@ "import": "./lib/esm/nip94.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2670309
238
25706