[][src]Struct solana_libra_nextgen_crypto::bls12381::BLS12381Signature

pub struct BLS12381Signature(_);

A BLS12-381 signature

Methods

impl BLS12381Signature[src]

pub fn to_bytes(&self) -> [u8; 96][src]

Serializes a BLS12381Signature

Methods from Deref<Target = Signature>

pub fn parity(&self) -> bool[src]

Returns true if the signature contains an odd number of ones.

pub fn to_bytes(&self) -> [u8; 96][src]

Returns a byte string representation of the signature.

Trait Implementations

impl Signature for BLS12381Signature[src]

type VerifyingKeyMaterial = BLS12381PublicKey

The associated verifying key type for this signature.

type SigningKeyMaterial = BLS12381PrivateKey

The associated signing key type for this signature

fn verify(
    &self,
    message: &HashValue,
    public_key: &BLS12381PublicKey
) -> Result<()>
[src]

Checks that signature is valid for message using public_key.

fn verify_arbitrary_msg(
    &self,
    message: &[u8],
    public_key: &BLS12381PublicKey
) -> Result<()>
[src]

Checks that signature is valid for an arbitrary &u8 message using public_key.

fn batch_verify_signatures(
    message: &HashValue,
    keys_and_signatures: Vec<(Self::VerifyingKeyMaterial, Self)>
) -> Result<()>
[src]

The implementer can override a batch verification implementation that by default iterates over each signature. More efficient implementations exist and should be implemented for many schemes. Read more

impl Clone for BLS12381Signature[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<BLS12381Signature> for BLS12381Signature[src]

impl Eq for BLS12381Signature[src]

impl Debug for BLS12381Signature[src]

impl Deref for BLS12381Signature[src]

type Target = Signature

The resulting type after dereferencing.

impl Hash for BLS12381Signature[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'_> TryFrom<&'_ [u8]> for BLS12381Signature[src]

type Error = CryptoMaterialError

The type returned in the event of a conversion error.

impl Serialize for BLS12381Signature[src]

impl<'de> Deserialize<'de> for BLS12381Signature[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> TestOnlyHash for T where
    T: Serialize + ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,