wxMaxima
Loading...
Searching...
No Matches
thirdparty
wxpdfdoc
src
crypto
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
16
namespace
wxpdfdoc {
17
namespace
crypto {
18
19
struct
sha512_state
20
{
21
std::uint64_t length;
22
std::uint64_t state[8];
23
std::uint32_t curlen;
24
unsigned
char
buf[128];
25
};
26
27
void
sha_init(
sha512_state
& md);
28
void
sha_process(
sha512_state
& md,
const
void
* in, std::uint32_t inlen);
29
void
sha_done(
sha512_state
& md,
void
* out);
30
31
}
// namespace crypto
32
}
// namespace wxpdfdoc
33
34
#endif
// WXPDFDOC_CRYPTO_SHA512_H_
wxpdfdoc::crypto::sha512_state
Definition:
sha512.h:20
Generated by
1.9.6