core: blob+stream: Store stream/blob hashes
Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <openssl/sha.h>
|
||||
#include "blobchain/memlib.h"
|
||||
#include "blobchain/stream.h"
|
||||
|
||||
@@ -56,6 +57,7 @@ stream_from_file(struct data_stream *stmp, const char *path)
|
||||
return -1;
|
||||
}
|
||||
|
||||
SHA256(stmp->data, stmp->length, stmp->hash);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user