You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pEpEngine/src/mime.c

35 lines
631 B
C

// This file is under GNU General Public License 3.0
// see LICENSE.txt
#define _EXPORT_PEP_ENGINE_DLL
#include "mime.h"
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
static bool is_whitespace(char c)
{
switch (c) {
case ' ':
case '\t':
case '\r':
case '\n':
return true;
default:
return false;
}
}
DYNAMIC_API bool is_PGP_message_text(const char *text)
{
if (text == NULL)
return false;
for (; *text && is_whitespace(*text); text++);
return strncmp(text, "-----BEGIN PGP MESSAGE-----", 27) == 0;
}