Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Sha512.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_CRYPTO_SHA512_HPP_
2#define IV_SRC_CRYPTO_SHA512_HPP_
3
4#include <cstdint>
5#include <string>
6#include <vector>
7
8//https://github.com/pr0f3ss/SHA extraido de aquĆ­
9class Sha512 final
10{
11public:
12 Sha512() = default;
13
14 Sha512(const Sha512 &other) = delete;
15 Sha512(Sha512 &&other) = delete;
16
17 ~Sha512() = default;
18
19 Sha512 &operator=(const Sha512 &other) = delete;
20 Sha512 &operator=(const Sha512 &&other) = delete;
21
22 static std::vector<std::byte> digest(void *input, uint32_t input_length);
23
24private:
25 static uint64_t **preprocess(const unsigned char *input, uint32_t &nBuffer);
26 static void appendLen(size_t l, uint64_t &lo, uint64_t &hi);
27 static void process(uint64_t **buffer, size_t nBuffer, uint64_t *h);
28 static void freeBuffer(uint64_t **buffer, size_t nBuffer);
29};
30
31#endif//IV_SRC_CRYPTO_SHA512_HPP_
Definition Sha512.hpp:10
static void freeBuffer(uint64_t **buffer, size_t nBuffer)
Definition Sha512.cpp:144
Sha512(const Sha512 &other)=delete
Sha512 & operator=(const Sha512 &&other)=delete
Sha512()=default
Sha512(Sha512 &&other)=delete
static uint64_t ** preprocess(const unsigned char *input, uint32_t &nBuffer)
Definition Sha512.cpp:97
static std::vector< std::byte > digest(void *input, uint32_t input_length)
Definition Sha512.cpp:170
static void process(uint64_t **buffer, size_t nBuffer, uint64_t *h)
Definition Sha512.cpp:53
Sha512 & operator=(const Sha512 &other)=delete
static void appendLen(size_t l, uint64_t &lo, uint64_t &hi)
Definition Sha512.cpp:47
~Sha512()=default