mirror of
https://github.com/xtr-dev/rondevu-server.git
synced 2025-12-10 10:53:24 +00:00
fix: use async ed25519.verifyAsync function
Switch from sync verify() to async verifyAsync() to work with hashes.sha512Async which uses WebCrypto API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@xtr-dev/rondevu-server",
|
"name": "@xtr-dev/rondevu-server",
|
||||||
"version": "0.2.2",
|
"version": "0.2.3",
|
||||||
"description": "DNS-like WebRTC signaling server with username claiming and service discovery",
|
"description": "DNS-like WebRTC signaling server with username claiming and service discovery",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -267,8 +267,8 @@ export async function verifyEd25519Signature(
|
|||||||
const encoder = new TextEncoder();
|
const encoder = new TextEncoder();
|
||||||
const messageBytes = encoder.encode(message);
|
const messageBytes = encoder.encode(message);
|
||||||
|
|
||||||
// Verify signature using @noble/ed25519
|
// Verify signature using @noble/ed25519 (async version)
|
||||||
const isValid = await ed25519.verify(signatureBytes, messageBytes, publicKeyBytes);
|
const isValid = await ed25519.verifyAsync(signatureBytes, messageBytes, publicKeyBytes);
|
||||||
return isValid;
|
return isValid;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Ed25519 signature verification failed:', err);
|
console.error('Ed25519 signature verification failed:', err);
|
||||||
|
|||||||
Reference in New Issue
Block a user