pub struct Signature(/* private fields */);Expand description
A detached ed25519 signature over a payload.
A signature is 64 bytes on the wire. Send it alongside the payload it covers, and
the receiver checks it with the signer’s PublicIdentity
to confirm the payload came from that device and was not altered in transit.
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn from_bytes(bytes: &[u8; 64]) -> Self
pub fn from_bytes(bytes: &[u8; 64]) -> Self
Reconstructs a signature from its 64-byte wire form.
The bytes are not validated here; an invalid signature is rejected when it is
checked by PublicIdentity::verify.
§Arguments
bytes- the 64-byte encoded signature.
§Returns
The signature.
Trait Implementations§
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 UnsafeUnpin 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