Trait PrivateSignatureKey

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§