Struct fog_crypto::identity::Signature [−][src]
An annotated cryptographic signature.
Includes the version of hash that was signed, the Identity
of the signer, and the signature
itself. These are always encoded together to make it easier to verify signatures appended to a
chunk of data.
A signature can be constructed in one of two ways: calling sign(...)
on an IdentityKey
,
or by verifying an UnverifiedSignature
.
The byte encoding is specifically:
- The Hash version byte
- The encoded signing
Identity
- The cryptographic signature’s raw bytes
Implementations
impl Signature
[src]
pub fn hash_version(&self) -> u8
[src]
The version of the Hash
used in signature computation.
pub fn signer(&self) -> &Identity
[src]
The public Identity
of the IdentityKey
that created this signature.
pub fn encode_vec(&self, buf: &mut Vec<u8>)
[src]
Encode the signature onto a Vec<u8>
. Adds the hash version, signing identity, and
signature bytes.
pub fn size(&self) -> usize
[src]
The length of the signature, in bytes, when encoded.
Trait Implementations
impl Clone for Signature
[src]
impl Debug for Signature
[src]
impl Eq for Signature
[src]
impl PartialEq<Signature> for Signature
[src]
impl StructuralEq for Signature
[src]
impl StructuralPartialEq for Signature
[src]
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,