Struct btlib::crypto::AsymKeyPair
source · pub struct AsymKeyPair<S: Scheme> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<S: Clone + Scheme> Clone for AsymKeyPair<S>
impl<S: Clone + Scheme> Clone for AsymKeyPair<S>
source§fn clone(&self) -> AsymKeyPair<S>
fn clone(&self) -> AsymKeyPair<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Decrypter for AsymKeyPair<Encrypt>
impl Decrypter for AsymKeyPair<Encrypt>
source§impl<'de, S: Scheme> Deserialize<'de> for AsymKeyPair<S>
impl<'de, S: Scheme> Deserialize<'de> for AsymKeyPair<S>
source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl Encrypter for AsymKeyPair<Encrypt>
impl Encrypter for AsymKeyPair<Encrypt>
source§impl Principaled for AsymKeyPair<Sign>
impl Principaled for AsymKeyPair<Sign>
source§impl Signer for AsymKeyPair<Sign>
impl Signer for AsymKeyPair<Sign>
source§fn init_sign(&self) -> Result<Box<dyn SignOp + '_>>
fn init_sign(&self) -> Result<Box<dyn SignOp + '_>>
Starts a new signing operation and returns the struct representing it.
source§fn sign(&self, parts: &mut dyn Iterator<Item = &[u8]>) -> Result<Signature>
fn sign(&self, parts: &mut dyn Iterator<Item = &[u8]>) -> Result<Signature>
Returns a signature over the given parts. It’s critical that subsequent invocations
of this method on the same instance return a Signature with
data
fields of the same
length.fn kind(&self) -> Sign
fn sign_writecap(&self, writecap: &mut Writecap) -> Result<()>
Auto Trait Implementations§
impl<S> RefUnwindSafe for AsymKeyPair<S>where S: RefUnwindSafe,
impl<S> Send for AsymKeyPair<S>where S: Send,
impl<S> Sync for AsymKeyPair<S>where S: Sync,
impl<S> Unpin for AsymKeyPair<S>where S: Unpin,
impl<S> UnwindSafe for AsymKeyPair<S>where S: UnwindSafe,
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> DecrypterExt for Twhere
T: Decrypter + ?Sized,
impl<T> DecrypterExt for Twhere T: Decrypter + ?Sized,
fn ser_decrypt<T: DeserializeOwned>(&self, ct: &Ciphertext<T>) -> Result<T>
source§impl<T> EncrypterExt for Twhere
T: Encrypter + ?Sized,
impl<T> EncrypterExt for Twhere T: Encrypter + ?Sized,
source§fn ser_encrypt<T: Serialize>(&self, value: &T) -> Result<Ciphertext<T>>
fn ser_encrypt<T: Serialize>(&self, value: &T) -> Result<Ciphertext<T>>
Serializes the given value into a new vector, then encrypts it and returns the resulting
ciphertext.