pub trait PrivateSignatureKey:
    Send
    + Sync
    + Sized
    + Clone
    + Debug
    + Eq
    + Hash
    + for<'a> TryFrom<&'a TaggedBase64> {
    // Required methods
    fn to_bytes(&self) -> Vec<u8> ;
    fn from_bytes(bytes: &[u8]) -> Result<Self>;
    fn to_tagged_base64(&self) -> Result<TaggedBase64, Tb64Error>;
}
Expand description

Trait for abstracting private signature key

Required Methods§

source

fn to_bytes(&self) -> Vec<u8>

Serialize the private key into bytes

source

fn from_bytes(bytes: &[u8]) -> Result<Self>

Deserialize the private key from bytes

§Errors

If deserialization fails.

source

fn to_tagged_base64(&self) -> Result<TaggedBase64, Tb64Error>

Serialize the private key into TaggedBase64 blob.

§Errors

If serialization fails.

Object Safety§

This trait is not object safe.

Implementors§