#[repr(C)]pub struct Signature { /* private fields */ }
Available on crate feature
key
only.Expand description
Ed25519 signature.
This type represents a container for the byte serialization of an Ed25519 signature, and does not necessarily represent well-formed field or curve elements.
Signature verification libraries are expected to reject invalid field elements at the time a signature is verified.
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn from_bytes(bytes: &[u8; 64]) -> Signature
pub fn from_bytes(bytes: &[u8; 64]) -> Signature
Parse an Ed25519 signature from a byte slice.
Sourcepub fn from_components(R: [u8; 32], s: [u8; 32]) -> Signature
pub fn from_components(R: [u8; 32], s: [u8; 32]) -> Signature
Parse an Ed25519 signature from its R
and s
components.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Signature, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Signature, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromStr for Signature
impl FromStr for Signature
Decode a signature from hexadecimal.
Upper and lower case hexadecimal are both accepted, however mixed case is rejected.
Source§impl Serialize for Signature
impl Serialize for Signature
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl SignatureEncoding for Signature
impl SignatureEncoding for Signature
impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)