#[repr(C)]pub struct Signature { /* private fields */ }
Expand description
Ed25519 signature.
Implementations§
source§impl Signature
impl Signature
sourcepub fn from_bytes(bytes: &SignatureBytes) -> Result<Self>
pub fn from_bytes(bytes: &SignatureBytes) -> Result<Self>
Parse an Ed25519 signature from a byte slice.
sourcepub fn from_components(R: ComponentBytes, s: ComponentBytes) -> Result<Self>
pub fn from_components(R: ComponentBytes, s: ComponentBytes) -> Result<Self>
Parse an Ed25519 signature from its R
and s
components.
sourcepub fn r_bytes(&self) -> &ComponentBytes
pub fn r_bytes(&self) -> &ComponentBytes
Bytes for the R
component of a signature.
sourcepub fn s_bytes(&self) -> &ComponentBytes
pub fn s_bytes(&self) -> &ComponentBytes
Bytes for the s
component of a signature.
sourcepub fn to_bytes(&self) -> SignatureBytes
pub fn to_bytes(&self) -> SignatureBytes
Return the inner byte array.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Signature
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Signature
Available on crate feature
serde
only.source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de> Deserialize<'de> for Signature
Available on crate feature serde_bytes
only.
impl<'de> Deserialize<'de> for Signature
Available on crate feature
serde_bytes
only.fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl From<&Signature> for SignatureBytes
impl From<&Signature> for SignatureBytes
source§fn from(sig: &Signature) -> SignatureBytes
fn from(sig: &Signature) -> SignatureBytes
Converts to this type from the input type.
source§impl From<Signature> for SignatureBytes
impl From<Signature> for SignatureBytes
source§fn from(sig: Signature) -> SignatureBytes
fn from(sig: Signature) -> SignatureBytes
Converts to this type from the input type.
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.