#[non_exhaustive]pub struct GpgMe {}Expand description
Used when the user configures gpgme to be used as a pgp backend.
Trait Implementations§
Source§impl Crypto for GpgMe
impl Crypto for GpgMe
Source§fn decrypt_string(&self, ciphertext: &[u8]) -> Result<String>
fn decrypt_string(&self, ciphertext: &[u8]) -> Result<String>
Reads a file and decrypts it Read more
Source§fn encrypt_string(
&self,
plaintext: &str,
recipients: &[Recipient],
) -> Result<Vec<u8>>
fn encrypt_string( &self, plaintext: &str, recipients: &[Recipient], ) -> Result<Vec<u8>>
Encrypts a string Read more
Source§fn sign_string(
&self,
to_sign: &str,
valid_gpg_signing_keys: &[[u8; 20]],
strategy: &FindSigningFingerprintStrategy,
) -> Result<String>
fn sign_string( &self, to_sign: &str, valid_gpg_signing_keys: &[[u8; 20]], strategy: &FindSigningFingerprintStrategy, ) -> Result<String>
Returns a gpg signature for the supplied string. Suitable to add to a gpg commit. Read more
Source§fn verify_sign(
&self,
data: &[u8],
sig: &[u8],
valid_signing_keys: &[[u8; 20]],
) -> Result<SignatureStatus, VerificationError>
fn verify_sign( &self, data: &[u8], sig: &[u8], valid_signing_keys: &[[u8; 20]], ) -> Result<SignatureStatus, VerificationError>
Verifies is a signature is valid Read more
Source§fn is_key_in_keyring(&self, recipient: &Recipient) -> Result<bool>
fn is_key_in_keyring(&self, recipient: &Recipient) -> Result<bool>
Returns true if a recipient is in the user’s keyring.
Source§fn pull_keys(
&mut self,
recipients: &[&Recipient],
_config_path: &Path,
) -> Result<String>
fn pull_keys( &mut self, recipients: &[&Recipient], _config_path: &Path, ) -> Result<String>
Pull keys from the keyserver for those recipients. Read more
Source§fn import_key(&mut self, key: &str, _config_path: &Path) -> Result<String>
fn import_key(&mut self, key: &str, _config_path: &Path) -> Result<String>
Import a key from text. Read more
Source§fn get_key(&self, key_id: &str) -> Result<Box<dyn Key>>
fn get_key(&self, key_id: &str) -> Result<Box<dyn Key>>
Return a key corresponding to the given key id. Read more
Source§fn get_all_trust_items(&self) -> Result<HashMap<[u8; 20], OwnerTrustLevel>>
fn get_all_trust_items(&self) -> Result<HashMap<[u8; 20], OwnerTrustLevel>>
Returns a map from key fingerprints to OwnerTrustLevel’s Read more
Source§fn implementation(&self) -> CryptoImpl
fn implementation(&self) -> CryptoImpl
Returns the type of this
CryptoImpl, useful for serializing the store configAuto Trait Implementations§
impl Freeze for GpgMe
impl RefUnwindSafe for GpgMe
impl Send for GpgMe
impl Sync for GpgMe
impl Unpin for GpgMe
impl UnwindSafe for GpgMe
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.