Struct nix_compat::narinfo::VerifyingKey
source · pub struct VerifyingKey {
name: String,
verifying_key: VerifyingKey,
}
Expand description
This represents a ed25519 public key and “name”.
These are normally passed in the trusted-public-keys
Nix config option,
and consist of a name and base64-encoded ed25519 pubkey, separated by a :
.
Fields§
§name: String
§verifying_key: VerifyingKey
Implementations§
source§impl VerifyingKey
impl VerifyingKey
pub fn new(name: String, verifying_key: VerifyingKey) -> Self
pub fn parse(input: &str) -> Result<Self, Error>
pub fn name(&self) -> &str
sourcepub fn verify(&self, fingerprint: &str, signature: &SignatureRef<'_>) -> bool
pub fn verify(&self, fingerprint: &str, signature: &SignatureRef<'_>) -> bool
Verify the passed in signature is a correct signature for the passed in fingerprint and is signed by the key material referred to by Self, which means the name in the signature has to match, and the signature bytes themselves need to be a valid signature made by the signing key identified by [Self::verifying key].
Trait Implementations§
source§impl Clone for VerifyingKey
impl Clone for VerifyingKey
source§fn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
Returns a copy 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 VerifyingKey
impl Debug for VerifyingKey
source§impl Display for VerifyingKey
impl Display for VerifyingKey
source§impl PartialEq for VerifyingKey
impl PartialEq for VerifyingKey
source§fn eq(&self, other: &VerifyingKey) -> bool
fn eq(&self, other: &VerifyingKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for VerifyingKey
impl StructuralPartialEq for VerifyingKey
Auto Trait Implementations§
impl Freeze for VerifyingKey
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
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