The winsparkle-tool is a companion utility used to generate keys and sign updates. It is included in the bin directory of the binary package, in the tools directory of the NuGet package, or can be compiled from source.
1. Generate EdDSA keys
Run the following command once to create your key pair. Back up your private key (eddsa_priv.pem) securely; if lost, you cannot issue new updates.
$ winsparkle-tool generate-key --file private.key
2. Add the public key to your project
You must provide the public key to your application using one of two methods:
**Method A: Windows Resource
**Add the public key to your resource file using this format:
EdDSAPub EDDSA {"YOUR_PUBLIC_KEY"}
Method B: API Call
**Call the following function in your code:
win_sparkle_set_eddsa_public_key("YOUR_PUBLIC_KEY");
$ winsparkle-tool generate-key --file private.key
Private key saved to private.key
Public key: pXAx0wfi8kGbeQln11+V4R3tCepSuLXeo7LkOeudc/U=
# Example Resource entry:
EdDSAPub EDDSA {"pXAx0wfi8kGbeQln11+V4R3tCepSuLXeo7LkOeudc/U="}
# Example API call:
win_sparkle_set_eddsa_public_key("pXAx0wfi8kGbeQln11+V4R3tCepSuLXeo7LkOeudc/U=");