/// Verifies whether the message is correctly signed with the signature assumed to be made by a
/// node of the given index.
Verifies whether the message is correctly signed with the signature assumed to be made by a
node of the given index.
Verifies whether the message is correctly signed with the signature assumed to be made by a node of the given index .
pub fn verify(&self, msg: &[u8], sgn: &Signature, index: NodeIndex) -> bool {
        let sig = sgn.clone().to_bytes();
        match self.authorities.get(&index) {
            Some(public_key) => public_key.verify(msg, &sig),
            None => {
                warn!("No public key for {:?}", index);
                false
            }
        }
    }
pub fn verify ( & self , msg : & [ u8 ] , sgn : & Signature , index : NodeIndex ) -> bool { let sig = sgn . clone ( ) . to_bytes ( ) ; match self . authorities . get ( & index ) { Some ( public_key ) => public_key . verify ( msg , & sig ) , None => { warn ! ( " " index ) ; false } } }
Verifies whether the message is correctly signed with the signature assumed to be made by a
node of the given index.
Verifies whether the message is correctly signed with the signature assumed to be made by a node of the given index .
&self
msg
&[u8]
sgn
&Signature
index
NodeIndex