Struct Ed25519Signature
#[repr(C)]pub struct Ed25519Signature { /* private fields */ }
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§
§impl Signature
impl Signature
pub fn from_bytes(bytes: &[u8; 64]) -> Signature
pub fn from_bytes(bytes: &[u8; 64]) -> Signature
Parse an Ed25519 signature from a byte slice.
pub 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.
pub fn from_slice(bytes: &[u8]) -> Result<Signature, Error>
pub fn from_slice(bytes: &[u8]) -> Result<Signature, Error>
Parse an Ed25519 signature from a byte slice.
§Returns
Ok
on successErr
if the input byte slice is not 64-bytes
Trait Implementations§
Source§impl From<Signature> for Signature
impl From<Signature> for Signature
Source§fn from(sig: Ed25519Signature) -> Signature
fn from(sig: Ed25519Signature) -> Signature
Converts to this type from the input type.
§impl FromStr for Signature
Decode a signature from hexadecimal.
impl FromStr for Signature
Decode a signature from hexadecimal.
Upper and lower case hexadecimal are both accepted, however mixed case is rejected.
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