pub enum RemotePublicKey {
Ed25519(PublicKey),
Rsa(PublicKey),
}Expand description
The public key of a remote node’s identity keypair. Supports RSA keys additionally to ed25519.
Variants§
Implementations§
Source§impl RemotePublicKey
impl RemotePublicKey
Sourcepub fn verify(&self, msg: &[u8], sig: &[u8]) -> bool
pub fn verify(&self, msg: &[u8], sig: &[u8]) -> bool
Verify a signature for a message using this public key, i.e. check that the signature has been produced by the corresponding private key (authenticity), and that the message has not been tampered with (integrity).
Sourcepub fn from_protobuf_encoding(
bytes: &[u8],
) -> Result<RemotePublicKey, ParseError>
pub fn from_protobuf_encoding( bytes: &[u8], ) -> Result<RemotePublicKey, ParseError>
Decode a public key from a protobuf structure, e.g. read from storage or received from another node.
Trait Implementations§
Source§impl Clone for RemotePublicKey
impl Clone for RemotePublicKey
Source§fn clone(&self) -> RemotePublicKey
fn clone(&self) -> RemotePublicKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RemotePublicKey
impl Debug for RemotePublicKey
Source§impl PartialEq for RemotePublicKey
impl PartialEq for RemotePublicKey
impl Eq for RemotePublicKey
impl StructuralPartialEq for RemotePublicKey
Auto Trait Implementations§
impl Freeze for RemotePublicKey
impl RefUnwindSafe for RemotePublicKey
impl Send for RemotePublicKey
impl Sync for RemotePublicKey
impl Unpin for RemotePublicKey
impl UnwindSafe for RemotePublicKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.