[][src]Enum phar::Signature

pub enum Signature {
    Md5(Md5),
    Sha1(Sha1),
    Sha256(Sha256),
    Sha512(Sha512),
}

A possible phar signature

Variants

Md5(Md5)
This is supported on crate feature sig-md5 only.

Signature corresponding to Phar::MD5

Sha1(Sha1)
This is supported on crate feature sig-sha1 only.

Signature corresponding to Phar::SHA1

Sha256(Sha256)
This is supported on crate feature sig-sha2 only.

Signature corresponding to Phar::SHA256

Sha512(Sha512)
This is supported on crate feature sig-sha2 only.

Signature corresponding to Phar::SHA512

Implementations

impl Signature[src]

pub fn from_u32(discrim: u32) -> Option<Signature>[src]

Creates a signature from the phar format flag

pub fn to_u32(&self) -> u32[src]

Returns the phar format flag of the signature type

pub fn size(&self) -> u8[src]

The number of bytes used for this signature

pub fn write(&mut self) -> impl Write + '_[src]

Returns a Write that writes to the underlying digest

pub fn finalize(self) -> SmallVec<[u8; 64]>[src]

Returns the memory allocated by the underlying signature implementation

Trait Implementations

impl Debug 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, 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.