LeviLamina
Loading...
Searching...
No Matches
ISystemInterface.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/crypto/asymmetric/Padding.h"
7#include "mc/deps/crypto/asymmetric/PrivateKeySigningFormat.h"
8#include "mc/deps/crypto/asymmetric/PubKeyFormat.h"
9#include "mc/deps/crypto/hash/HashType.h"
10
11namespace Crypto::Asymmetric {
12
14public:
15 // virtual functions
16 // NOLINTBEGIN
17 virtual ~ISystemInterface() = default;
18
19 virtual bool generateKeyPair(::std::string& privateKey, ::std::string& publicKey) = 0;
20
21 virtual bool
22 constructPublicKey(::std::string const& modulus, ::std::string const& exponent, ::std::string& keyOut) = 0;
23
24 virtual ::std::string encryptData(
25 ::std::string const& publicKey,
26 ::std::string const& data,
27 ::Crypto::Asymmetric::Padding paddingType,
28 ::Crypto::Asymmetric::PubKeyFormat keyFormat,
29 bool useSHA256
30 ) = 0;
31
32 virtual ::std::string decryptData(
33 ::std::string const& privateKey,
34 ::std::string const& data,
35 ::Crypto::Asymmetric::Padding paddingType
36 ) = 0;
37
38 virtual ::std::string signData(
39 ::std::string const& privateKey,
40 ::std::string const& data,
41 ::Crypto::Hash::HashType hash,
42 ::Crypto::Asymmetric::PrivateKeySigningFormat format
43 ) = 0;
44
45 virtual bool verifyData(
46 ::std::string const& publicKey,
47 ::std::string const& signature,
48 ::std::string const& data,
49 ::Crypto::Hash::HashType hash
50 ) = 0;
51
52 virtual ::std::string
53 computeSharedSecret(::std::string const& myPrivateKey, ::std::string const& peerPublicKey) = 0;
54 // NOLINTEND
55
56public:
57 // virtual function thunks
58 // NOLINTBEGIN
59
60 // NOLINTEND
61};
62
63} // namespace Crypto::Asymmetric
Definition ISystemInterface.h:13