Struct ed25519_dalek::Signature[][src]

pub struct Signature(_);
Expand description

Ed25519 signature.

Implementations

impl Signature[src]

pub fn new(bytes: [u8; 64]) -> Signature[src]

Create a new signature from a byte array

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

Return the inner byte array

Trait Implementations

impl AsRef<[u8]> for Signature[src]

pub fn as_ref(&self) -> &[u8][src]

Performs the conversion.

impl Clone for Signature[src]

pub fn clone(&self) -> Signature[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Debug for Signature[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

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

pub fn deserialize<D>(
    deserializer: D
) -> Result<Signature, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl From<[u8; 64]> for Signature[src]

pub fn from(bytes: [u8; 64]) -> Signature[src]

Performs the conversion.

impl PartialEq<Signature> for Signature[src]

pub fn eq(&self, other: &Signature) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Serialize for Signature[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Signature for Signature[src]

pub fn from_bytes(bytes: &[u8]) -> Result<Signature, Error>[src]

Parse a signature from its byte representation

fn as_bytes(&self) -> &[u8][src]

Borrow a byte slice representing the serialized form of this signature

impl Signer<Signature> for Keypair[src]

fn try_sign(&self, message: &[u8]) -> Result<Signature, SignatureError>[src]

Sign a message with this keypair’s secret key.

fn sign(&self, msg: &[u8]) -> S[src]

Sign the given message and return a digital signature

impl<'a> TryFrom<&'a [u8]> for Signature[src]

type Error = Error

The type returned in the event of a conversion error.

pub fn try_from(bytes: &'a [u8]) -> Result<Signature, Error>[src]

Performs the conversion.

impl Verifier<Signature> for Keypair[src]

fn verify(
    &self,
    message: &[u8],
    signature: &Signature
) -> Result<(), SignatureError>
[src]

Verify a signature on a message with this keypair’s public key.

impl Verifier<Signature> for PublicKey[src]

fn verify(
    &self,
    message: &[u8],
    signature: &Signature
) -> Result<(), SignatureError>
[src]

Verify a signature on a message with this keypair’s public key.

Return

Returns Ok(()) if the signature is valid, and Err otherwise.

impl Copy for Signature[src]

impl Eq for Signature[src]

Auto Trait Implementations

impl RefUnwindSafe for Signature

impl Send for Signature

impl Sync for Signature

impl Unpin for Signature

impl UnwindSafe for Signature

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

pub fn vzip(self) -> V[src]

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