Trait crypto::signatures::ternary::PublicKey[][src]

pub trait PublicKey {
    type Signature: Signature;
    type Error;
    fn verify(
        &self,
        message: &Trits<T1B1>,
        signature: &Self::Signature
    ) -> Result<bool, Self::Error>;
fn size(&self) -> usize;
fn from_trits(buf: TritBuf<T1B1Buf>) -> Result<Self, Self::Error>
    where
        Self: Sized
;
fn as_trits(&self) -> &Trits<T1B1>; }
This is supported on crate feature ternary_signatures only.

A ternary public key.

Associated Types

type Signature: Signature[src]

Matching signature type.

type Error[src]

Errors occuring while handling public keys.

Loading content...

Required methods

fn verify(
    &self,
    message: &Trits<T1B1>,
    signature: &Self::Signature
) -> Result<bool, Self::Error>
[src]

Verifies a signature for a given message.

Arguments

  • message A slice that holds a message to verify a signature for.
  • signature The signature to verify.

fn size(&self) -> usize[src]

Returns the size of the public key.

fn from_trits(buf: TritBuf<T1B1Buf>) -> Result<Self, Self::Error> where
    Self: Sized
[src]

Creates a public key from trits.

fn as_trits(&self) -> &Trits<T1B1>[src]

Interprets the public key as trits.

Loading content...

Implementors

impl<S: Sponge + Default> PublicKey for WotsPublicKey<S>[src]

This is supported on crate feature wots_deprecated_do_not_use only.

type Signature = WotsSignature<S>

type Error = Error

Loading content...