pub struct Signer {
pub verfer: Verfer,
/* private fields */
}Expand description
Signer is a Matter subclass with method to create signature of serialization using: .raw as signing (private) key seed, .code as cipher suite for signing .verfer whose property .raw is public key for signing.
If not provided, .verfer is generated from private key seed using .code as cipher suite for creating key-pair.
Fields§
§verfer: VerferImplementations§
Source§impl Signer
impl Signer
Sourcepub fn new(
raw: Option<&[u8]>,
code: Option<&str>,
transferable: Option<bool>,
) -> Result<Self, MatterError>
pub fn new( raw: Option<&[u8]>, code: Option<&str>, transferable: Option<bool>, ) -> Result<Self, MatterError>
Create a new Signer with the given parameters
Sourcepub fn from_raw(raw: Option<&[u8]>) -> Result<Self, MatterError>
pub fn from_raw(raw: Option<&[u8]>) -> Result<Self, MatterError>
Create a Signer from raw bytes using default code
pub fn set_verfer(&mut self, verfer: Verfer)
Sourcepub fn sign(
&self,
ser: &[u8],
index: Option<u32>,
only: Option<bool>,
ondex: Option<u32>,
) -> Result<Sigmat, MatterError>
pub fn sign( &self, ser: &[u8], index: Option<u32>, only: Option<bool>, ondex: Option<u32>, ) -> Result<Sigmat, MatterError>
Sign the serialization and return a signature (Cigar or Siger)
pub fn from_qb64b_and_transferable( data: &mut Vec<u8>, strip: Option<bool>, transferable: bool, ) -> Result<Self, MatterError>
Trait Implementations§
Source§impl Matter for Signer
impl Matter for Signer
Source§fn is_transferable(&self) -> bool
fn is_transferable(&self) -> bool
Returns whether the derivation code is transferable
Source§fn is_digestive(&self) -> bool
fn is_digestive(&self) -> bool
Returns whether the code represents a digest
Source§fn is_prefixive(&self) -> bool
fn is_prefixive(&self) -> bool
Returns whether the code represents a prefix
Source§fn is_special(&self) -> bool
fn is_special(&self) -> bool
Returns whether the code represents a prefix
fn as_any(&self) -> &dyn Any
Auto Trait Implementations§
impl Freeze for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnsafeUnpin for Signer
impl UnwindSafe for Signer
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