Add test for decrypting email
Description
Description
Details
Details
- Auditors
• werner - Provenance
CarlSchwan Authored on Sep 7 2023, 2:03 PM - Parents
- rMTP4026d5db5b0a: Allow saving email either unchanged or decrypted
- Branches
- Unknown
- Tags
Event Timeline
/src/core/cryptohelper.cpp | ||
---|---|---|
178 | Please use a macro here like X_PGP_BEGIN_MESSAGE "-----BEGIN PGP MESSAGE-----" if (!strncmp (c, X_PGP_BEGIN_MESSAGE, sizeof (X_PGP_BEGIN_MESSAGE)) { } Duplicating strings is not good for future maintenance. It is too easy to accidentally edit one of them without noticing. |
Comment Actions
I think using a static const char * is better than using a macro. In fact, using a static constexpr std::string may be even better because we avoid calculating the string length during runtime again and again. (I'm not sure the compiler is clever enough to precalculate the string length of a static const char *.)