From 465b4309e832fcbeb29fe7b8a2b192d79ab4d4b2 Mon Sep 17 00:00:00 2001 From: Kabie Date: Wed, 11 May 2022 09:25:09 +0800 Subject: [PATCH] fix typos (#610) Co-authored-by: David Wolinsky --- config/management/operational/src/keys.rs | 4 ++-- crates/aptos-crypto/src/x25519.rs | 4 ++-- crates/aptos/src/op/key.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/management/operational/src/keys.rs b/config/management/operational/src/keys.rs index 687b892d7be84..9911081ebdb52 100644 --- a/config/management/operational/src/keys.rs +++ b/config/management/operational/src/keys.rs @@ -83,14 +83,14 @@ impl GenerateKey { .map_err(|err| Error::UnexpectedError(err.to_string()))?; save_key( &key, - "x22519 PrivateKey", + "x25519 PrivateKey", self.key_file.as_path(), self.encoding, ) } KeyType::Ed25519 => save_key( ed25519_key, - "ed22519 PrivateKey", + "ed25519 PrivateKey", self.key_file.as_path(), self.encoding, ), diff --git a/crates/aptos-crypto/src/x25519.rs b/crates/aptos-crypto/src/x25519.rs index a8c9ec00b1f76..808355009bd00 100644 --- a/crates/aptos-crypto/src/x25519.rs +++ b/crates/aptos-crypto/src/x25519.rs @@ -96,7 +96,7 @@ impl PrivateKey { shared_secret.as_bytes().to_owned() } - /// Deserialize an X25119 PrivateKey given the sha512 pre-image of a hash + /// Deserialize an X25519 PrivateKey given the sha512 pre-image of a hash /// whose least significant half is a canonical X25519 scalar, following /// the XEdDSA approach. /// @@ -131,7 +131,7 @@ impl PublicKey { &self.0 } - /// Deserialize an X25119 PublicKey from its representation as an + /// Deserialize an X25519 PublicKey from its representation as an /// Ed25519PublicKey, following the XEdDSA approach. This is meant to /// compensate for the poor key storage capabilities of key management /// solutions, and NOT to promote double usage of keys under several diff --git a/crates/aptos/src/op/key.rs b/crates/aptos/src/op/key.rs index 6feac530526e7..40ae6b816299c 100644 --- a/crates/aptos/src/op/key.rs +++ b/crates/aptos/src/op/key.rs @@ -125,9 +125,9 @@ impl CliCommand> for GenerateKey { let private_key = x25519::PrivateKey::from_ed25519_private_bytes(&ed25519_key.to_bytes()) .map_err(|err| CliError::UnexpectedError(err.to_string()))?; - self.save_params.save_key(&private_key, "x22519") + self.save_params.save_key(&private_key, "x25519") } - KeyType::Ed25519 => self.save_params.save_key(&ed25519_key, "ed22519"), + KeyType::Ed25519 => self.save_params.save_key(&ed25519_key, "ed25519"), } } }