Struct ssi_verification_methods_core::protocol::Base58Btc
source · pub struct Base58Btc;
Expand description
Base58Btc protocol.
The signer must sent back the signature encoded in base58 (bitcoin alphabet).
Implementations§
source§impl Base58Btc
impl Base58Btc
sourcepub fn encode_signature(signature: &[u8]) -> Vec<u8>
pub fn encode_signature(signature: &[u8]) -> Vec<u8>
Encode the signature in base58 (bitcoin alphabet) as required by this protocol.
pub fn decode_signature( encoded_signature: &[u8], ) -> Result<Vec<u8>, InvalidProtocolSignature>
Trait Implementations§
source§impl<A> SignatureProtocol<A> for Base58Btc
impl<A> SignatureProtocol<A> for Base58Btc
source§fn encode_signature(
&self,
_algorithm: A,
signature: Vec<u8>,
) -> Result<Vec<u8>, MessageSignatureError>
fn encode_signature( &self, _algorithm: A, signature: Vec<u8>, ) -> Result<Vec<u8>, MessageSignatureError>
Encode the signature in base58 (bitcoin alphabet) as required by this protocol.
fn decode_signature<'s>( &self, encoded_signature: &'s [u8], ) -> Result<Cow<'s, [u8]>, InvalidProtocolSignature>
fn prepare_message<'b>(&self, bytes: &'b [u8]) -> Cow<'b, [u8]>
fn prepare_messages<'b>(&self, bytes: &'b [Vec<u8>]) -> Cow<'b, [Vec<u8>]>
impl Copy for Base58Btc
Auto Trait Implementations§
impl Freeze for Base58Btc
impl RefUnwindSafe for Base58Btc
impl Send for Base58Btc
impl Sync for Base58Btc
impl Unpin for Base58Btc
impl UnwindSafe for Base58Btc
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
source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
Returns a reference to the resource of type
T
.