mirror of
https://github.com/xtr-dev/rondevu-server.git
synced 2025-12-10 02:43: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",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.3",
|
||||
"description": "DNS-like WebRTC signaling server with username claiming and service discovery",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -267,8 +267,8 @@ export async function verifyEd25519Signature(
|
||||
const encoder = new TextEncoder();
|
||||
const messageBytes = encoder.encode(message);
|
||||
|
||||
// Verify signature using @noble/ed25519
|
||||
const isValid = await ed25519.verify(signatureBytes, messageBytes, publicKeyBytes);
|
||||
// Verify signature using @noble/ed25519 (async version)
|
||||
const isValid = await ed25519.verifyAsync(signatureBytes, messageBytes, publicKeyBytes);
|
||||
return isValid;
|
||||
} catch (err) {
|
||||
console.error('Ed25519 signature verification failed:', err);
|
||||
|
||||
Reference in New Issue
Block a user