Home Explore Blog Models CI



nix

1st chunk of `src/nix/key-convert-secret-to-public.md`
d4fc346cb5875f173ffc72f021c98ef70dac0264598cfb44000000010000020e
R""(

# Examples

* Convert a secret key to a public key:

  ```console
  # echo cache.example.org-0:E7lAO+MsPwTFfPXsdPtW8GKui/5ho4KQHVcAGnX+Tti1V4dUxoVoqLyWJ4YESuZJwQ67GVIksDt47og+tPVUZw== \
    | nix key convert-secret-to-public
  cache.example.org-0:tVeHVMaFaKi8lieGBErmScEOuxlSJLA7eO6IPrT1VGc=
  ```

# Description

This command reads a Ed25519 secret key from standard input, and
writes the corresponding public key to standard output. For more
details, see [nix key generate-secret](./nix3-key-generate-secret.md).

)""

Title: nix key convert-secret-to-public Command
Summary
This section explains the `nix key convert-secret-to-public` command, which converts an Ed25519 secret key to its corresponding public key. It provides an example demonstrating how to pipe a secret key to the command's standard input to receive the public key on standard output. For more details, it references `nix key generate-secret`.