[][src]Trait pgp::types::SecretKeyTrait

pub trait SecretKeyTrait: PublicKeyTrait {
    type PublicKey;
    fn unlock<F, G>(&self, pw: F, work: G) -> Result<()>
    where
        F: FnOnce() -> String,
        G: FnOnce(&SecretKeyRepr) -> Result<()>
;
fn create_signature<F>(
        &self,
        key_pw: F,
        hash: HashAlgorithm,
        data: &[u8]
    ) -> Result<Vec<Mpi>>
    where
        F: FnOnce() -> String
;
fn public_key(&self) -> Self::PublicKey; }

Associated Types

Loading content...

Required methods

fn unlock<F, G>(&self, pw: F, work: G) -> Result<()> where
    F: FnOnce() -> String,
    G: FnOnce(&SecretKeyRepr) -> Result<()>, 

fn create_signature<F>(
    &self,
    key_pw: F,
    hash: HashAlgorithm,
    data: &[u8]
) -> Result<Vec<Mpi>> where
    F: FnOnce() -> String

fn public_key(&self) -> Self::PublicKey

Loading content...

Implementations on Foreign Types

impl<'a, T: SecretKeyTrait> SecretKeyTrait for &'a T[src]

type PublicKey = T::PublicKey

Loading content...

Implementors

impl SecretKeyTrait for SignedSecretKey[src]

type PublicKey = PublicKey

impl SecretKeyTrait for SignedSecretSubKey[src]

type PublicKey = PublicSubkey

impl SecretKeyTrait for SecretKey[src]

type PublicKey = PublicKey

fn unlock<F, G>(&self, pw: F, work: G) -> Result<()> where
    F: FnOnce() -> String,
    G: FnOnce(&SecretKeyRepr) -> Result<()>, 
[src]

Unlock the raw data in the secret parameters.

impl SecretKeyTrait for SecretSubkey[src]

type PublicKey = PublicSubkey

fn unlock<F, G>(&self, pw: F, work: G) -> Result<()> where
    F: FnOnce() -> String,
    G: FnOnce(&SecretKeyRepr) -> Result<()>, 
[src]

Unlock the raw data in the secret parameters.

Loading content...