pub struct AsymKey<P, S> { /* private fields */ }
Expand description
Represents any kind of asymmetric key.
Implementations§
Trait Implementations§
source§impl<'de, S: Scheme> Deserialize<'de> for AsymKey<Private, S>
impl<'de, S: Scheme> Deserialize<'de> for AsymKey<Private, 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<'de, S: Scheme> Deserialize<'de> for AsymKey<Public, S>
impl<'de, S: Scheme> Deserialize<'de> for AsymKey<Public, 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<S: Scheme> PartialEq<AsymKey<Public, S>> for AsymKey<Public, S>
impl<S: Scheme> PartialEq<AsymKey<Public, S>> for AsymKey<Public, S>
source§impl Signer for AsymKey<Private, Sign>
impl Signer for AsymKey<Private, 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<P, S> RefUnwindSafe for AsymKey<P, S>where P: RefUnwindSafe, S: RefUnwindSafe,
impl<P, S> Send for AsymKey<P, S>where S: Send,
impl<P, S> Sync for AsymKey<P, S>where S: Sync,
impl<P, S> Unpin for AsymKey<P, S>where P: Unpin, S: Unpin,
impl<P, S> UnwindSafe for AsymKey<P, S>where P: UnwindSafe, 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.