<commit_before>#include "SecureString.h"

#include <string.h>
#include <algorithm>

////////////////////////////////////////////////////////////////////////////////
//crc32 from http://web.archive.org/web/20080217222203/http://c.snippets.org/ //
////////////////////////////////////////////////////////////////////////////////
#define DWORD uint32_t
#define BYTE uint8_t

DWORD updateCRC32(unsigned char ch, DWORD crc);
DWORD crc32buf(const char *buf, size_t len);
////////////////////////////////////////////////////////////////////////////////

#ifdef SECURESTRING_OVERRIDE_DEFAULT_ALLOCATED
#else DEFAULT_ALLOCATED SECURESTRING_OVERRIDE_DEFAULT_ALLOCATED
#define DEFAULT_ALLOCATED 80
#endif

using namespace Kryptan::Core;

SecureString::SecureString(void){
    init();
}

SecureString::SecureString(ssnr size){
    init();
    allocate(size);
}

SecureString::SecureString(ssarr str, ssnr maxlen, bool deleteStr){
    init();
    assign(str, maxlen, deleteStr);
}<commit_msg>Fixed an erronous  #define statement.<commit_after>#include "SecureString.h"

#include <string.h>
#include <algorithm>

////////////////////////////////////////////////////////////////////////////////
//crc32 from http://web.archive.org/web/20080217222203/http://c.snippets.org/ //
////////////////////////////////////////////////////////////////////////////////
#define DWORD uint32_t
#define BYTE uint8_t

DWORD updateCRC32(unsigned char ch, DWORD crc);
DWORD crc32buf(const char *buf, size_t len);
////////////////////////////////////////////////////////////////////////////////

#ifdef SECURESTRING_OVERRIDE_DEFAULT_ALLOCATED
#define DEFAULT_ALLOCATED SECURESTRING_OVERRIDE_DEFAULT_ALLOCATED
#else
#define DEFAULT_ALLOCATED 80
#endif

using namespace Kryptan::Core;

SecureString::SecureString(void){
    init();
}

SecureString::SecureString(ssnr size){
    init();
    allocate(size);
}

SecureString::SecureString(ssarr str, ssnr maxlen, bool deleteStr){
    init();
    assign(str, maxlen, deleteStr);
}
{'fraction_non_alphanumeric': 0.33015075376884423, 'fraction_numerical': 0.02512562814070352, 'mean_word_length': 1.8361823361823362, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7413149', 'n_tokens_mistral': 582, 'n_tokens_neox': 540, 'n_words': 115}