pub enum SecretKey {
Curve25519 {
secret: [u8; 32],
hash: HashAlgorithm,
alg_sym: SymmetricKeyAlgorithm,
},
P256 {
secret: [u8; 32],
hash: HashAlgorithm,
alg_sym: SymmetricKeyAlgorithm,
},
P384 {
secret: [u8; 48],
hash: HashAlgorithm,
alg_sym: SymmetricKeyAlgorithm,
},
P521 {
secret: [u8; 66],
hash: HashAlgorithm,
alg_sym: SymmetricKeyAlgorithm,
},
}
Expand description
Secret key for ECDH
Variants§
Curve25519
ECDH with Curve25519
P256
ECDH with Nist P256
P384
ECDH with Nist P384
P521
ECDH with Nist P521
Trait Implementations§
Source§impl Decryptor for SecretKey
impl Decryptor for SecretKey
type EncryptionFields<'a> = EncryptionFields<'a>
fn decrypt(&self, data: Self::EncryptionFields<'_>) -> Result<Vec<u8>>
Source§impl KeyParams for SecretKey
impl KeyParams for SecretKey
type KeyParams = (ECCCurve, SymmetricKeyAlgorithm, HashAlgorithm)
fn key_params(&self) -> Self::KeyParams
impl Eq for SecretKey
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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