pub struct NodeCredentials {
pub signing: SigningKey,
pub verifying: VerifyingKey,
}Expand description
Ed25519 credentials loaded from PEM files.
Fields§
§signing: SigningKey§verifying: VerifyingKeyImplementations§
Source§impl NodeCredentials
impl NodeCredentials
pub fn load_signing_pem(path: &str) -> Result<SigningKey, IdentityError>
pub fn load_verifying_pem(path: &str) -> Result<VerifyingKey, IdentityError>
pub fn sign(&self, data: &[u8]) -> Signature
pub fn verify(&self, data: &[u8], sig: &Signature) -> bool
Trait Implementations§
Source§impl Clone for NodeCredentials
impl Clone for NodeCredentials
Source§fn clone(&self) -> NodeCredentials
fn clone(&self) -> NodeCredentials
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 moreAuto Trait Implementations§
impl Freeze for NodeCredentials
impl RefUnwindSafe for NodeCredentials
impl Send for NodeCredentials
impl Sync for NodeCredentials
impl Unpin for NodeCredentials
impl UnwindSafe for NodeCredentials
Blanket Implementations§
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