* @brief Pass::getDefaultKeyTemplate return default key generation template * Uses ed25519 if supported, otherwise falls back to RSA * @return GPG batch template string */
| 218 | * @return GPG batch template string |
| 219 | */ |
| 220 | QString Pass::getDefaultKeyTemplate() { |
| 221 | if (gpgSupportsEd25519()) { |
| 222 | return QStringLiteral("%echo Generating a default key\n" |
| 223 | "Key-Type: EdDSA\n" |
| 224 | "Key-Curve: Ed25519\n" |
| 225 | "Subkey-Type: ECDH\n" |
| 226 | "Subkey-Curve: Curve25519\n" |
| 227 | "Name-Real: \n" |
| 228 | "Name-Comment: QtPass\n" |
| 229 | "Name-Email: \n" |
| 230 | "Expire-Date: 0\n" |
| 231 | "%no-protection\n" |
| 232 | "%commit\n" |
| 233 | "%echo done"); |
| 234 | } |
| 235 | return QStringLiteral("%echo Generating a default key\n" |
| 236 | "Key-Type: RSA\n" |
| 237 | "Subkey-Type: RSA\n" |
| 238 | "Name-Real: \n" |
| 239 | "Name-Comment: QtPass\n" |
| 240 | "Name-Email: \n" |
| 241 | "Expire-Date: 0\n" |
| 242 | "%no-protection\n" |
| 243 | "%commit\n" |
| 244 | "%echo done"); |
| 245 | } |
| 246 | |
| 247 | namespace { |
| 248 | auto resolveWslGpgconfPath(const QString &lastPart) -> QString { |
nothing calls this directly
no outgoing calls
no test coverage detected