1/*
2 * Copyright 2017, DornerWorks
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * This data was produced by DornerWorks, Ltd. of Grand Rapids, MI, USA under
7 * a DARPA SBIR, Contract Number D16PC00107.
8 *
9 * Approved for Public Release, Distribution Unlimited.
10 *
11 */
12
13#pragma once
14
15#include "crypt_sha256.h"
16#include "crypt_md5.h"
17
18/* enum to store the hashing methods */
19enum hash_methods {
20    SHA_256,
21    MD5
22};
23
24/* Structure that contains a structure for each hash type and an integer representation
25 * of the hashing method used
26 */
27typedef struct {
28    sha256_t sha_structure;
29    md5_t md5_structure;
30    unsigned int hash_type;
31} hashes_t;
32
33void get_hash(hashes_t hashes, const void *file_to_hash, unsigned long bytes_to_hash, uint8_t *outputted_hash);
34void print_hash(uint8_t *hash_to_print, int bytes_to_print);
35
36