Trait iota_types::crypto::IotaSignatureInner

source ·
pub trait IotaSignatureInner: Sized + ToFromBytes + PartialEq + Eq + Hash {
    type Sig: Authenticator<PubKey = Self::PubKey>;
    type PubKey: VerifyingKey<Sig = Self::Sig> + IotaPublicKey;
    type KeyPair: KeypairTraits<PubKey = Self::PubKey, Sig = Self::Sig>;

    const LENGTH: usize = _;
    const SCHEME: SignatureScheme = <Self::PubKey>::SIGNATURE_SCHEME;

    // Provided methods
    fn get_verification_inputs(&self) -> IotaResult<(Self::Sig, Self::PubKey)> { ... }
    fn new(kp: &Self::KeyPair, message: &[u8]) -> Self { ... }
}

Required Associated Types§

source

type Sig: Authenticator<PubKey = Self::PubKey>

source

type PubKey: VerifyingKey<Sig = Self::Sig> + IotaPublicKey

source

type KeyPair: KeypairTraits<PubKey = Self::PubKey, Sig = Self::Sig>

Provided Associated Constants§

source

const LENGTH: usize = _

source

const SCHEME: SignatureScheme = <Self::PubKey>::SIGNATURE_SCHEME

Provided Methods§

source

fn get_verification_inputs(&self) -> IotaResult<(Self::Sig, Self::PubKey)>

Returns the deserialized signature and deserialized pubkey.

source

fn new(kp: &Self::KeyPair, message: &[u8]) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl IotaSignatureInner for Ed25519IotaSignature

§

type Sig = Ed25519Signature

§

type PubKey = Ed25519PublicKey

§

type KeyPair = Ed25519KeyPair

source§

const LENGTH: usize = 97usize

source§

impl IotaSignatureInner for Secp256k1IotaSignature

§

type Sig = Secp256k1Signature

§

type PubKey = Secp256k1PublicKey

§

type KeyPair = Secp256k1KeyPair

source§

const LENGTH: usize = 98usize

source§

impl IotaSignatureInner for Secp256r1IotaSignature

§

type Sig = Secp256r1Signature

§

type PubKey = Secp256r1PublicKey

§

type KeyPair = Secp256r1KeyPair

source§

const LENGTH: usize = 98usize