fix: handle potential null values when creating Buffers from signing keys (#1558)

This commit is contained in:
João Lucas de Oliveira Lopes
2025-06-25 14:58:13 -03:00
committed by GitHub
parent 42112ac389
commit 210338c747

View File

@@ -98,7 +98,7 @@ export class SenderKeyState {
return Buffer.from(publicKey, 'base64')
}
return Buffer.from(publicKey)
return Buffer.from(publicKey || [])
}
public getSigningKeyPrivate(): Buffer | undefined {
@@ -113,7 +113,7 @@ export class SenderKeyState {
return Buffer.from(privateKey, 'base64')
}
return Buffer.from(privateKey)
return Buffer.from(privateKey || [])
}
public hasSenderMessageKey(iteration: number): boolean {