[][src]Trait jwt_compact::AlgorithmSignature

pub trait AlgorithmSignature: Sized {
    fn try_from_slice(slice: &[u8]) -> Result<Self, Error>;
fn as_bytes(&self) -> Cow<[u8]>; }

Signature for a certain JWT signing Algorithm.

We require that signature can be restored from a byte slice, and can be represented as a byte slice.

Required methods

fn try_from_slice(slice: &[u8]) -> Result<Self, Error>

Attempts to restore a signature from a byte slice. This method may fail if the slice is malformed (e.g., has a wrong length).

fn as_bytes(&self) -> Cow<[u8]>

Represents this signature as bytes.

Loading content...

Implementations on Foreign Types

impl AlgorithmSignature for Signature[src]

impl AlgorithmSignature for MacResult<U32>[src]

impl AlgorithmSignature for MacResult<U48>[src]

impl AlgorithmSignature for MacResult<U64>[src]

impl AlgorithmSignature for Signature[src]

Loading content...

Implementors

Loading content...