Skip to content

Commit

Permalink
Revamp elliptic utils
Browse files Browse the repository at this point in the history
  • Loading branch information
kigawas committed Oct 29, 2024
1 parent 7e3f95e commit 5a7fb74
Show file tree
Hide file tree
Showing 7 changed files with 188 additions and 156 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

- Revamp encapsulate/decapsulate
- Revamp symmetric encryption/decryption
- Revamp elliptic utils

## 0.4.10

Expand Down
2 changes: 1 addition & 1 deletion example/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"eciesjs": "file:../.."
},
"devDependencies": {
"vite": "6.0.0-beta.4",
"vite": "6.0.0-beta.5",
"vite-bundle-visualizer": "^1.2.1"
}
}
3 changes: 2 additions & 1 deletion example/browser/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export function setup(encryptedElement, textElement, decryptedElement) {
const _decrypt = () => {
encryptedElement.innerHTML = `click me to encrypt`;
if (encrypted) {
textElement.innerHTML = `${decoder.decode(decrypt(sk.secret, encrypted))}`;
const decrypted = decoder.decode(decrypt(sk.secret, encrypted));
textElement.innerHTML = `${decrypted}`;
decryptedElement.innerHTML = `decrypted:`;
encrypted = undefined;
} else {
Expand Down
8 changes: 6 additions & 2 deletions example/browser/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ export default defineConfig({
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes("@noble")) {
return "noble";
if (id.includes("@noble/curves")) {
return "noble-curves";
} else if (id.includes("@noble/ciphers")) {
return "noble-ciphers";
} else if (id.includes("@noble/hashes")) {
return "noble-hashes";
} else if (id.includes("buffer")) {
return "buffer";
}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
"@noble/hashes": "^1.5.0"
},
"devDependencies": {
"@types/node": "^22.8.1",
"@vitest/coverage-v8": "^2.1.3",
"@types/node": "^22.8.2",
"@vitest/coverage-v8": "^2.1.4",
"typescript": "^5.6.3",
"undici": "^6.20.1",
"vitest": "^2.1.3"
"vitest": "^2.1.4"
},
"packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
}
Loading

0 comments on commit 5a7fb74

Please sign in to comment.