wxMaxima
Loading...
Searching...
No Matches
sha512.h
1/*
2** Name: sha512.h
3** Purpose: SHA-512 hashing
4** Copyright: (c) 2024-2024 Ulrich Telle
5** SPDX-License-Identifier: MIT
6*/
7
8// SHA-512. Adapted from LibTomCrypt (Public Domain).
9
10#pragma once
11#ifndef WXPDFDOC_CRYPTO_SHA512_H_
12#define WXPDFDOC_CRYPTO_SHA512_H_
13
14#include <cstdint>
15
16namespace wxpdfdoc {
17namespace crypto {
18
20{
21 std::uint64_t length;
22 std::uint64_t state[8];
23 std::uint32_t curlen;
24 unsigned char buf[128];
25};
26
27void sha_init(sha512_state& md);
28void sha_process(sha512_state& md, const void* in, std::uint32_t inlen);
29void sha_done(sha512_state& md, void* out);
30
31} // namespace crypto
32} // namespace wxpdfdoc
33
34#endif // WXPDFDOC_CRYPTO_SHA512_H_
Definition: sha512.h:20