Skip to content
Snippets Groups Projects
Commit 1e0b1338 authored by Gav's avatar Gav
Browse files

Fix verify logic.

parent c245b38e
No related merge requests found
......@@ -111,7 +111,7 @@ pub fn twox_128(data: &[u8]) -> [u8; 16] {
/// Verify a ed25519 signature.
pub fn ed25519_verify(sig: &[u8], msg: &[u8], pubkey: &[u8]) -> bool {
sig.len() != 64 || pubkey.len() != 32 || unsafe {
sig.len() == 64 && pubkey.len() == 32 && unsafe {
ext_ed25519_verify(msg.as_ptr(), msg.len() as u32, sig.as_ptr(), pubkey.as_ptr())
} == 0
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment