Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (13 sloc) 335 Bytes
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include "sha1.h"
int main(int argc, char **argv) {
const char* hash = "hello";
char* digest = malloc(28);
char* expected = "qvTGHdzF6KLavt4PO0gs2a6pQ00=";
shacalc(hash, digest);
assert(strcmp(expected, digest) == 0);
fprintf(stderr, "%s\n", digest);
return 0;
}