[][src]Struct cashweb_keyserver_client::models::AuthWrapper

pub struct AuthWrapper {
    pub public_key: Vec<u8>,
    pub signature: Vec<u8>,
    pub scheme: i32,
    pub payload: Vec<u8>,
    pub payload_digest: Vec<u8>,
}

AuthWrapper provides integrity, authentication, and non-repuditation by providing a standard structure for covering blobs with signatures.

Fields

public_key: Vec<u8>

The public key associated with the signature.

signature: Vec<u8>

The signature by public key covering the payload.

scheme: i32

The signature scheme used for signing.

payload: Vec<u8>

The payload covered by the signature.

payload_digest: Vec<u8>

The SHA256 digest of the payload.

Implementations

impl AuthWrapper[src]

pub fn parse(self) -> Result<ParsedAuthWrapper, ParseError>[src]

Parse the AuthWrapper to construct a ParsedAuthWrapper.

The involves deserialization of both public keys, calculation of the payload digest, and coercion of byte fields into fixed-length arrays.

impl AuthWrapper[src]

pub fn scheme(&self) -> SignatureScheme[src]

Returns the enum value of scheme, or the default if the field is set to an invalid enum value.

pub fn set_scheme(&mut self, value: SignatureScheme)[src]

Sets scheme to the provided enum value.

Trait Implementations

impl Clone for AuthWrapper[src]

impl Debug for AuthWrapper[src]

impl Default for AuthWrapper[src]

impl Message for AuthWrapper[src]

impl PartialEq<AuthWrapper> for AuthWrapper[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> 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>,