fn verify(
        &mut self,
        signature: &[u8; 64],
        public_key: &[u8],
        data: &[u8],
    ) -> ockam_core::Result<()> {
        // FIXME
        if public_key.len() == CURVE25519_PUBLIC_LENGTH {
            if x25519_dalek::PublicKey::from(*array_ref!(public_key, 0, CURVE25519_PUBLIC_LENGTH))
                .verify(data.as_ref(), &signature)
            {
                Ok(())
            } else {
                Err(VaultError::InvalidSignature.into())
            }
        } else {
            Err(VaultError::InvalidPublicKey.into())
        }
    }
/// Verify signature with xeddsa algorithm. Only curve25519 is supported.
Verify signature with xeddsa algorithm. Only curve25519 is supported.
Verify signature with xeddsa algorithm . Only curve25519 is supported .
fn verify(
        &mut self,
        signature: &[u8; 64],
        public_key: &[u8],
        data: &[u8],
    ) -> ockam_core::Result<()> {
        // FIXME
        if public_key.len() == CURVE25519_PUBLIC_LENGTH {
            if x25519_dalek::PublicKey::from(*array_ref!(public_key, 0, CURVE25519_PUBLIC_LENGTH))
                .verify(data.as_ref(), &signature)
            {
                Ok(())
            } else {
                Err(VaultError::InvalidSignature.into())
            }
        } else {
            Err(VaultError::InvalidPublicKey.into())
        }
    }
fn verify ( & mut self , signature : & [ u8 ; 64 ] , public_key : & [ u8 ] , data : & [ u8 ] , ) -> ockam_core :: Result < ( ) > { // FIXME if public_key . len ( ) == CURVE25519_PUBLIC_LENGTH { if x25519_dalek :: PublicKey :: from ( * array_ref ! ( public_key 0 CURVE25519_PUBLIC_LENGTH ) ) . verify ( data . as_ref ( ) , & signature ) { Ok ( ( ) ) } else { Err ( VaultError :: InvalidSignature . into ( ) ) } } else { Err ( VaultError :: InvalidPublicKey . into ( ) ) } }
Verify signature with xeddsa algorithm.
Verify signature with xeddsa algorithm .
&mut self
signature
&[u8; 64]
public_key
&[u8]
data
&[u8]
&mut self
signature
&[u8; 64]
public_key
&[u8]
data
&[u8]