Skip to content

Commit

Permalink
fix typos (aptos-labs#610)
Browse files Browse the repository at this point in the history
Co-authored-by: David Wolinsky <[email protected]>
  • Loading branch information
Kabie and davidiw authored May 11, 2022
1 parent f66df69 commit 465b430
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions config/management/operational/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand Down
4 changes: 2 additions & 2 deletions crates/aptos-crypto/src/x25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions crates/aptos/src/op/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ impl CliCommand<HashMap<&'static str, PathBuf>> 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"),
}
}
}
Expand Down

0 comments on commit 465b430

Please sign in to comment.