Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
crypto: Fix an 'unused import' warning
Alexis Sellier committed 3 years ago
commit 86a38e208b65f868db455e02a5c7ae43401c1d14
parent f6177f85fe5cd76dd46190b10766bb2510b3b1fd
1 file changed +3 -3
modified radicle-crypto/src/ssh/keystore.rs
@@ -5,7 +5,7 @@ use std::{fs, io};
use thiserror::Error;
use zeroize::Zeroizing;

-
use crate::{keypair, KeyPair, PublicKey, SecretKey, SharedSecret, Signature, Signer, SignerError};
+
use crate::{keypair, KeyPair, PublicKey, SecretKey, Signature, Signer, SignerError};

/// A secret key passphrase.
pub type Passphrase = Zeroizing<String>;
@@ -155,10 +155,10 @@ impl Signer for MemorySigner {
#[cfg(feature = "cyphernet")]
impl cyphernet::crypto::Ecdh for MemorySigner {
    type Pk = PublicKey;
-
    type Secret = SharedSecret;
+
    type Secret = crate::SharedSecret;
    type Err = ed25519_compact::Error;

-
    fn ecdh(&self, other: &PublicKey) -> Result<SharedSecret, ed25519_compact::Error> {
+
    fn ecdh(&self, other: &PublicKey) -> Result<crate::SharedSecret, ed25519_compact::Error> {
        let pk = ed25519_compact::x25519::PublicKey::from_ed25519(other)?;
        let sk = ed25519_compact::x25519::SecretKey::from_ed25519(&self.secret)?;
        let ss = pk.dh(&sk)?;