diff options
| author | saturneric <[email protected]> | 2026-09-24 23:25:36 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-09-24 23:25:36 +0200 |
| commit | 3f333e189b716d61c054a7e3737cf2fed13ba5f2 (patch) | |
| tree | a956a8576b8c6a042af35db5b93a2a379e6830b9 /src | |
| parent | feat(update): track unseen releases without prompting (diff) | |
| download | modules-3f333e189b716d61c054a7e3737cf2fed13ba5f2.tar.gz modules-3f333e189b716d61c054a7e3737cf2fed13ba5f2.zip | |
refactor(email): simplify crypto SDK test stubs
- remove unused byte buffer duplication helper
- update the crypto entry point section comment
Diffstat (limited to 'src')
| -rw-r--r-- | src/m_email/test/EMailCryptoSdkStubs.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/m_email/test/EMailCryptoSdkStubs.cpp b/src/m_email/test/EMailCryptoSdkStubs.cpp index 2553b7f..ba66d3e 100644 --- a/src/m_email/test/EMailCryptoSdkStubs.cpp +++ b/src/m_email/test/EMailCryptoSdkStubs.cpp @@ -141,23 +141,7 @@ auto AppText(GFHostContextRef) -> const char* { return "test"; } auto AppLocale(GFHostContextRef) -> char* { return StrDupNormal("en_US"); } auto AppZero(GFHostContextRef) -> int { return 0; } -// --- the four crypto entry points ------------------------------------------- -// -// Both forms are provided. The string forms mirror the real SDK exactly, -// truncation included, so a test can still demonstrate what the old boundary -// did; the N forms record the length they were given. - -namespace { -// Mirrors GFBytesDup on the host side: byte-exact, NUL-terminated one past the -// end, with the true length reported separately. -auto BytesOut(const QByteArray& b, size_t* size) -> char* { - auto* d = static_cast<char*>(MemAllocNormal(b.size() + 1)); - std::memcpy(d, b.constData(), b.size()); - d[b.size()] = '\0'; - if (size != nullptr) *size = static_cast<size_t>(b.size()); - return d; -} -} // namespace +// --- the crypto entry points --------------------------------------------- auto GpgAnalyse(GFHostContextRef, int, int, uint32_t, const char* capsule_id, uint32_t, GFGpgAnalysis* out) -> int { |
