Struct fog_crypto::identity::Signature[][src]

pub struct Signature { /* fields omitted */ }

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:

  1. The Hash version byte
  2. The encoded signing Identity
  3. 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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,