feat(hash): added basic hashing functions to gain object ideas for the object storage
This commit is contained in:
parent
d7e754b67e
commit
d9066f10de
2 changed files with 61 additions and 0 deletions
18
include/hash.h
Normal file
18
include/hash.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef HASH_H
|
||||
#define HASH_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
typedef enum {
|
||||
FileObject,
|
||||
TreeObject,
|
||||
LogObject
|
||||
} ObjectType;
|
||||
|
||||
void object_hash(ObjectType, char*, char*);
|
||||
void hash_to_hex(const unsigned char*, char*);
|
||||
|
||||
#endif // HASH_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue