Mini Git
A reduced version of Git
Loading...
Searching...
No Matches
sha.cpp File Reference
#include <format>
#include <fstream>
#include <iostream>
#include <openssl/evp.h>
#include <string>
#include <vector>
Include dependency graph for sha.cpp:

Functions

std::string get_file_sha1 (const std::string &path)
 Takes a file path and returns the SHA1 hash of the file.
 
std::string get_sha1 (const std::vector< char > &data)
 Takes a char vector and returns the SHA1 hash of the string.
 

Function Documentation

◆ get_file_sha1()

std::string get_file_sha1 ( const std::string & path)

Takes a file path and returns the SHA1 hash of the file.

◆ get_sha1()

std::string get_sha1 ( const std::vector< char > & data)

Takes a char vector and returns the SHA1 hash of the string.