Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ssh-key/src/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ use crate::PrivateKey;
/// The serialization uses a binary encoding with binary formats like bincode
/// and CBOR, and the OpenSSH string serialization when used with
/// human-readable formats like JSON and TOML.
///
/// Note that since the `comment` is an artifact on the string serialization of
/// a public key, it will be implicitly dropped when encoding as a binary
/// format. To ensure it's always preserved even when using binary formats, you
/// will first need to convert the [`PublicKey`] to a string using e.g.
/// [`PublicKey::to_openssh`].
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct PublicKey {
/// Key data.
Expand Down