pub struct Signature {
pub algo: String,
pub public_key: Bytes,
pub sig: Bytes,
}Expand description
Cryptographic signature on a Commit or crate::objects::Operation.
Per SPEC §9.1, the signature is computed over the canonical DAG-CBOR
encoding of the containing object with the signature field absent.
M12 will add verification helpers; for now we model the shape only.
Fields§
§algo: StringAlgorithm identifier. MUST be "ed25519" for mnem/0.1.
public_key: BytesSigner’s public key. 32 bytes for Ed25519.
sig: BytesSignature bytes. 64 bytes for Ed25519.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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