Struct identity_iota::crypto::Ed25519
source · [−]Expand description
An implementation of Ed25519
signatures.
Implementations
sourceimpl Ed25519<[u8]>
impl Ed25519<[u8]>
sourcepub const PRIVATE_KEY_LENGTH: usize = 32usize
pub const PRIVATE_KEY_LENGTH: usize = 32usize
Length in bytes of an Ed25519 private key.
sourcepub const PUBLIC_KEY_LENGTH: usize = 32usize
pub const PUBLIC_KEY_LENGTH: usize = 32usize
Length in bytes of an Ed25519 public key.
sourcepub const SIGNATURE_LENGTH: usize = 64usize
pub const SIGNATURE_LENGTH: usize = 64usize
Length in bytes of an Ed25519 signature.
Trait Implementations
sourceimpl<T> Sign for Ed25519<T> where
T: AsRef<[u8]> + ?Sized,
impl<T> Sign for Ed25519<T> where
T: AsRef<[u8]> + ?Sized,
sourcefn sign(
message: &[u8],
key: &<Ed25519<T> as Sign>::Private
) -> Result<<Ed25519<T> as Sign>::Output, Error>
fn sign(
message: &[u8],
key: &<Ed25519<T> as Sign>::Private
) -> Result<<Ed25519<T> as Sign>::Output, Error>
Computes an EdDSA signature using an Ed25519 private key.
The private key must be a 32-byte seed in compliance with RFC 8032. Other implementations often use another format. See this blog post for further explanation.
type Private = T
type Private = T
The private key type of this signature implementation.
impl<T> Copy for Ed25519<T> where
T: Copy + ?Sized,
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for Ed25519<T> where
T: RefUnwindSafe,
impl<T: ?Sized> Send for Ed25519<T> where
T: Send,
impl<T: ?Sized> Sync for Ed25519<T> where
T: Sync,
impl<T: ?Sized> Unpin for Ed25519<T> where
T: Unpin,
impl<T: ?Sized> UnwindSafe for Ed25519<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more