pub enum PlainSecretParams {
RSA {
d: Mpi,
p: Mpi,
q: Mpi,
u: Mpi,
},
DSA(Mpi),
ECDSA(Mpi),
ECDH(Mpi),
Elgamal(Mpi),
EdDSALegacy(Mpi),
Ed25519([u8; 32]),
X25519([u8; 32]),
X448([u8; 56]),
}
Variants§
RSA
DSA(Mpi)
ECDSA(Mpi)
ECDH(Mpi)
Elgamal(Mpi)
EdDSALegacy(Mpi)
Ed25519([u8; 32])
X25519([u8; 32])
X448([u8; 56])
Implementations§
Source§impl PlainSecretParams
impl PlainSecretParams
pub fn from_slice( data: &[u8], alg: PublicKeyAlgorithm, _params: &PublicParams, ) -> Result<Self>
pub fn string_to_key_id(&self) -> u8
pub fn checksum_simple(&self) -> Vec<u8> ⓘ
Sourcepub fn checksum_sha1(&self) -> Result<[u8; 20]>
pub fn checksum_sha1(&self) -> Result<[u8; 20]>
Uses sha1_checked
pub fn as_ref(&self) -> PlainSecretParamsRef<'_>
pub fn encrypt( &self, passphrase: &str, s2k_params: S2kParams, pub_key: &(impl PublicKeyTrait + Serialize), secret_tag: Option<Tag>, ) -> Result<EncryptedSecretParams>
pub fn to_writer<W: Write>( &self, writer: &mut W, version: KeyVersion, ) -> Result<()>
Trait Implementations§
Source§impl Clone for PlainSecretParams
impl Clone for PlainSecretParams
Source§fn clone(&self) -> PlainSecretParams
fn clone(&self) -> PlainSecretParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PlainSecretParams
impl Debug for PlainSecretParams
Source§impl Drop for PlainSecretParams
impl Drop for PlainSecretParams
Source§impl PartialEq for PlainSecretParams
impl PartialEq for PlainSecretParams
Source§impl Zeroize for PlainSecretParams
impl Zeroize for PlainSecretParams
impl Eq for PlainSecretParams
impl StructuralPartialEq for PlainSecretParams
Auto Trait Implementations§
impl Freeze for PlainSecretParams
impl RefUnwindSafe for PlainSecretParams
impl Send for PlainSecretParams
impl Sync for PlainSecretParams
impl Unpin for PlainSecretParams
impl UnwindSafe for PlainSecretParams
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