MCPcopy Create free account
hub / github.com/IJHack/QtPass / getDefaultKeyTemplate

Method getDefaultKeyTemplate

src/pass.cpp:220–245  ·  view source on GitHub ↗

* @brief Pass::getDefaultKeyTemplate return default key generation template * Uses ed25519 if supported, otherwise falls back to RSA * @return GPG batch template string */

Source from the content-addressed store, hash-verified

218 * @return GPG batch template string
219 */
220QString 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
247namespace {
248auto resolveWslGpgconfPath(const QString &lastPart) -> QString {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected