Struct sequoia_sop::SQOP

source ·
pub struct SQOP<'s> { /* private fields */ }
Expand description

SOP implementation based on Sequoia PGP.

Implementations§

source§

impl<'s> SQOP<'s>

source

pub fn with_policy(policy: &'s dyn Policy) -> Self

Creates a sop::SOP implementation with an explicit sequoia_openpgp::policy::Policy.

To use the default sequoia_openpgp::policy::StandardPolicy, use SQOP::default.

Trait Implementations§

source§

impl Default for SQOP<'_>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'s> Load<'s, SQOP<'s>> for Certs<'s>

source§

fn from_reader( sop: &'s SQOP<'_>, source: &mut (dyn Read + Send + Sync) ) -> Result<Self>
where Self: Sized,

Loads objects like certs and keys from the given reader.
source§

fn from_bytes(sop: &'s S, source: &[u8]) -> Result<Self, Error>
where Self: Sized,

Loads objects like certs and keys from the given byte slice.
source§

impl<'s> Load<'s, SQOP<'s>> for Keys<'s>

source§

fn from_reader( sop: &'s SQOP<'_>, source: &mut (dyn Read + Send + Sync) ) -> Result<Self>
where Self: Sized,

Loads objects like certs and keys from the given reader.
source§

fn from_bytes(sop: &'s S, source: &[u8]) -> Result<Self, Error>
where Self: Sized,

Loads objects like certs and keys from the given byte slice.
source§

impl<'s> Load<'s, SQOP<'s>> for Sigs<'s>

source§

fn from_reader( sop: &'s SQOP<'_>, source: &mut (dyn Read + Send + Sync) ) -> Result<Self>
where Self: Sized,

Loads objects like certs and keys from the given reader.
source§

fn from_bytes(sop: &'s S, source: &[u8]) -> Result<Self, Error>
where Self: Sized,

Loads objects like certs and keys from the given byte slice.
source§

impl<'s> SOP<'s> for SQOP<'s>

§

type Keys = Keys<'s>

Secret keys.
§

type Certs = Certs<'s>

Public keys.
§

type Sigs = Sigs<'s>

Signatures.
source§

fn version(&'s self) -> Result<Box<dyn Version<'_> + 's>>

Gets version information. Read more
source§

fn generate_key( &'s self ) -> Result<Box<dyn GenerateKey<'_, SQOP<'_>, Keys<'_>> + 's>>

Generates a Secret Key. Read more
source§

fn change_key_password( &'s self ) -> Result<Box<dyn ChangeKeyPassword<'_, SQOP<'_>, Keys<'_>> + 's>>

Updates a key’s password. Read more
source§

fn revoke_key( &'s self ) -> Result<Box<dyn RevokeKey<'_, SQOP<'s>, Certs<'_>, Keys<'_>> + 's>>

Creates a Revocation Certificate. Read more
source§

fn extract_cert( &'s self ) -> Result<Box<dyn ExtractCert<'_, SQOP<'_>, Certs<'_>, Keys<'_>> + 's>>

Extracts a Certificate from a Secret Key. Read more
source§

fn sign( &'s self ) -> Result<Box<dyn Sign<'_, SQOP<'_>, Keys<'_>, Sigs<'_>> + 's>>

Creates Detached Signatures. Read more
source§

fn verify( &'s self ) -> Result<Box<dyn Verify<'_, SQOP<'_>, Certs<'_>, Sigs<'_>> + 's>>

Verifies Detached Signatures. Read more
source§

fn encrypt( &'s self ) -> Result<Box<dyn Encrypt<'_, SQOP<'_>, Certs<'_>, Keys<'_>> + 's>>

Encrypts a Message. Read more
source§

fn decrypt( &'s self ) -> Result<Box<dyn Decrypt<'_, SQOP<'_>, Certs<'_>, Keys<'_>> + 's>>

Decrypts a Message. Read more
source§

fn armor(&'s self) -> Result<Box<dyn Armor<'_> + 's>>

Converts binary OpenPGP data to ASCII. Read more
source§

fn dearmor(&'s self) -> Result<Box<dyn Dearmor<'_> + 's>>

Converts ASCII OpenPGP data to binary. Read more
source§

fn inline_detach(&'s self) -> Result<Box<dyn InlineDetach<'_, Sigs<'_>> + 's>>

Splits Signatures from an Inline-Signed Message. Read more
source§

fn inline_verify( &'s self ) -> Result<Box<dyn InlineVerify<'_, SQOP<'_>, Certs<'_>> + 's>>

Verifies an Inline-Signed Message. Read more
source§

fn inline_sign( &'s self ) -> Result<Box<dyn InlineSign<'_, SQOP<'_>, Keys<'_>> + 's>>

Creates an Inline-Signed Message. Read more
source§

fn spec_version(&'s self) -> &'static str

Gets SOP version information. Read more
source§

impl<'s> SopRef<'s, SQOP<'s>> for Certs<'s>

source§

fn sop(&self) -> &'s SQOP<'s>

Returns a reference to SOP.
source§

impl<'s> SopRef<'s, SQOP<'s>> for Keys<'s>

source§

fn sop(&self) -> &'s SQOP<'s>

Returns a reference to SOP.
source§

impl<'s> SopRef<'s, SQOP<'s>> for Sigs<'s>

source§

fn sop(&self) -> &'s SQOP<'s>

Returns a reference to SOP.

Auto Trait Implementations§

§

impl<'s> Freeze for SQOP<'s>

§

impl<'s> !RefUnwindSafe for SQOP<'s>

§

impl<'s> Send for SQOP<'s>

§

impl<'s> Sync for SQOP<'s>

§

impl<'s> Unpin for SQOP<'s>

§

impl<'s> !UnwindSafe for SQOP<'s>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.