<commit_before>#include <stdio.h>
#include <string.h>

#include "catena.h"

#define SALT_LEN 16

void print_hex(uint8_t *key, int len)
{
  int i;
  for(i=0; i< len; i++) printf("%02x",key[i]);  puts("");
}



int main()
{
  const size_t hashlen = 64;
  const uint8_t salt[SALT_LEN]=
    {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
     0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0XFF};
  const char *password = "Password";
  const char *data     = "I'm a header";
  const uint8_t lambda = LAMBDA;
#ifdef CATENA_INFO
  const uint8_t min_garlic = GARLIC-1;
#else
  const uint8_t min_garlic = GARLIC;
#endif
  const uint8_t garlic = GARLIC;


  uint8_t hash1[H_LEN];

#ifdef CATENA_INFO
  uint8_t hash2[H_LEN];
  uint8_t hash3[H_LEN];
  uint8_t hash4[H_LEN];
  uint8_t x[H_LEN];

  uint8_t key1[H_LEN];
  uint8_t key2[H_LEN/4];
  uint8_t key3[3*H_LEN+10];
  memset(hash2,0,H_LEN);
  memset(hash3,0,H_LEN);
  memset(hash4,0,H_LEN);
  memset(x,0,H_LEN);
#endif

  memset(hash1,0,H_LEN);

  Catena((uint8_t *) password, strlen(password) ,salt, SALT_LEN,
	 (uint8_t *) data, strlen(data), lambda, min_garlic, garlic,
	 hashlen, hash1);
  print_hex(hash1, hashlen);

#ifdef CATENA_INFO
  Catena_Client((uint8_t *) password, strlen(password), salt, SALT_LEN,
		(uint8_t *) data, strlen(data), lambda, min_garlic, garlic,<commit_msg>fixed test-catena<commit_after>#include <stdio.h>
#include <string.h>

#include "catena.h"

#define SALT_LEN 16

void print_hex(uint8_t *key, int len)
{
  int i;
  for(i=0; i< len; i++) printf("%02x",key[i]);  puts("");
}



int main()
{
  const size_t hashlen = 64;
  const uint8_t salt[SALT_LEN]=
    {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
     0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0XFF};
  uint8_t password[] = "Password";
  const char *data     = "I'm a header";
  const uint8_t lambda = LAMBDA;
#ifdef CATENA_INFO
  const uint8_t min_garlic = GARLIC-1;
#else
  const uint8_t min_garlic = GARLIC;
#endif
  const uint8_t garlic = GARLIC;


  uint8_t hash1[H_LEN];

#ifdef CATENA_INFO
  uint8_t hash2[H_LEN];
  uint8_t hash3[H_LEN];
  uint8_t hash4[H_LEN];
  uint8_t x[H_LEN];

  uint8_t key1[H_LEN];
  uint8_t key2[H_LEN/4];
  uint8_t key3[3*H_LEN+10];
  memset(hash2,0,H_LEN);
  memset(hash3,0,H_LEN);
  memset(hash4,0,H_LEN);
  memset(x,0,H_LEN);
#endif

  memset(hash1,0,H_LEN);

  Catena(password, strlen((char *)password) ,salt, SALT_LEN,
	 (uint8_t *) data, strlen(data), lambda, min_garlic, garlic,
	 hashlen, hash1);
  print_hex(hash1, hashlen);

#ifdef CATENA_INFO
  Catena_Client((uint8_t *) password, strlen(password), salt, SALT_LEN,
		(uint8_t *) data, strlen(data), lambda, min_garlic, garlic,
{'fraction_non_alphanumeric': 0.14856711915535445, 'fraction_numerical': 0.06334841628959276, 'mean_word_length': 4.705376344086021, 'pattern_counts': {'":': 0, '<': 9, '<?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': '610248', 'n_tokens_mistral': 1314, 'n_tokens_neox': 1225, 'n_words': 257}