Struct 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), source_name: Option<String>, ) -> Result<Self>
where Self: Sized,

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

fn source_name(&self) -> Option<&str>

Returns the source name, if any.
Source§

fn from_stdin(sop: &'s S) -> Result<Self, Error>
where Self: Sized,

Loads objects like certs and keys from stdin.
Source§

fn from_file<P>(sop: &'s S, path: P) -> Result<Self, Error>
where Self: Sized, P: AsRef<Path>,

Loads objects like certs and keys from the given file.
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), source_name: Option<String>, ) -> Result<Self>
where Self: Sized,

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

fn source_name(&self) -> Option<&str>

Returns the source name, if any.
Source§

fn from_stdin(sop: &'s S) -> Result<Self, Error>
where Self: Sized,

Loads objects like certs and keys from stdin.
Source§

fn from_file<P>(sop: &'s S, path: P) -> Result<Self, Error>
where Self: Sized, P: AsRef<Path>,

Loads objects like certs and keys from the given file.
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), source_name: Option<String>, ) -> Result<Self>
where Self: Sized,

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

fn source_name(&self) -> Option<&str>

Returns the source name, if any.
Source§

fn from_stdin(sop: &'s S) -> Result<Self, Error>
where Self: Sized,

Loads objects like certs and keys from stdin.
Source§

fn from_file<P>(sop: &'s S, path: P) -> Result<Self, Error>
where Self: Sized, P: AsRef<Path>,

Loads objects like certs and keys from the given file.
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>

Source§

type Keys = Keys<'s>

Secret keys.
Source§

type Certs = Certs<'s>

Public keys.
Source§

type Sigs = Sigs<'s>

Signatures.
Source§

fn debug(&mut self, enable: bool)

Controls debugging. Read more
Source§

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

Gets version information. Read more
Source§

fn sopv_version(&'s self) -> Result<&'static str>

Completeness of the sopv subset 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 update_key( &'s self, ) -> Result<Box<dyn UpdateKey<'_, Self, Self::Certs, Self::Keys> + 's>>

Keeps a Secret Key Up-To-Date. Read more
Source§

fn merge_certs( &'s self, ) -> Result<Box<dyn MergeCerts<'_, Self, Self::Certs> + 's>>

Merge OpenPGP Certificates. Read more
Source§

fn certify_userid( &'s self, ) -> Result<Box<dyn CertifyUserID<'_, Self, Self::Certs, Self::Keys> + 's>>

Certify OpenPGP Certificate User IDs. Read more
Source§

fn validate_userid( &'s self, ) -> Result<Box<dyn ValidateUserID<'_, Self, Self::Certs> + 's>>

Validate a User ID in an OpenPGP Certificate. 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T