#[repr(C)]pub struct Signature { /* 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§
§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 Signer<Signature> for SigningKey
impl Signer<Signature> for SigningKey
source§impl Verifier<Signature> for SigningKey
impl Verifier<Signature> for SigningKey
source§impl Verifier<Signature> for VerifyingKey
impl Verifier<Signature> for VerifyingKey
impl Copy for Signature
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
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§
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