acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
hasher_algorithm.h
1
#pragma once
2
3
4
namespace
openssl
5
{
6
7
8
//template < typename CTX, enum_hash m_ehash >
9
class
hasher_algorithm :
10
public
::crypto::hasher_algorithm
11
{
12
public
:
13
14
15
//::i32 SHA1_Init(SHA_CTX* c);
16
//::i32 SHA1_Update(SHA_CTX* c, const void* data, size_t len);
17
//::i32 SHA1_Final(::u8* md, SHA_CTX* c);
18
//::u8* SHA1(const ::u8* d, size_t n, ::u8* md);
19
//void SHA1_Transform(SHA_CTX* c, const ::u8* data);
20
21
22
//typedef ::i32 __HASH_INIT(EVP_MD_CTX* pctx);
23
//typedef ::i32 __HASH_UPDATE(CTX* pctx, const void* data, size_t len);
24
//typedef ::i32 __HASH_FINAL(::u8* md, CTX* pctx);
25
//typedef ::u8* __HASH_HASH(const ::u8* d, size_t n, ::u8* md);
26
27
28
//using HASH_INIT = __HASH_INIT*;
29
//using HASH_UPDATE = __HASH_UPDATE*;
30
//using HASH_FINAL = __HASH_FINAL*;
31
//using HASH_HASH = __HASH_HASH*;
32
33
34
//HASH_INIT m_pinit;
35
//HASH_UPDATE m_pupdate;
36
//HASH_FINAL m_pfinal;
37
//HASH_HASH m_phash;
38
const
enum_hash m_ehash;
39
const
EVP_MD * m_pmd;
40
41
42
hasher_algorithm(enum_hash ehash,
const
EVP_MD * pmd) :
43
m_ehash(ehash),
44
m_pmd(pmd)
45
{
46
47
}
48
49
50
virtual
enum_hash ehash()
const override
51
{
52
53
return
m_ehash;
54
55
}
56
57
58
virtual
void
hash(
memory
& memoryHash,
const
block
&
block
)
override
;
59
60
61
virtual ::pointer<::crypto::hasher>create_hasher()
override
;
62
63
64
};
65
66
67
}
// namespace openssl
68
69
70
crypto::hasher_algorithm
Definition
hasher_algorithm.h:13
memory
Definition
memory.h:33
openssl
Definition
rsa.h:5
block
Definition
block.h:46
crypto
openssl1
hasher_algorithm.h
Generated by
1.17.0