mirror of
https://tinyplantnews.com/git2/ldaphotos
synced 2025-01-11 02:45:14 +00:00
39 lines
575 B
C
39 lines
575 B
C
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
#include <errno.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
#include <criterion/criterion.h>
|
||
|
|
||
|
#include "main.h"
|
||
|
#include "manipulations.h"
|
||
|
#include "hasher.h"
|
||
|
#include "log.h"
|
||
|
|
||
|
#ifdef USE_LIBNOTIFY
|
||
|
#include <libnotify/notify.h>
|
||
|
#endif
|
||
|
|
||
|
Test(misc, passing){
|
||
|
cr_assert(1, "ya boi");
|
||
|
}
|
||
|
|
||
|
Test(misc, hashsomething){
|
||
|
|
||
|
if(!init_hasher()){
|
||
|
log(LOG_INFO, "Error encountered while initializing hasher");
|
||
|
}
|
||
|
|
||
|
begin_digest();
|
||
|
|
||
|
|
||
|
unsigned int len;
|
||
|
unsigned int aalen;
|
||
|
unsigned char * a = get_digest(&len);
|
||
|
char *aa = atohex(a, len, &aalen);
|
||
|
|
||
|
|
||
|
|
||
|
free(aa);
|
||
|
}
|