DynXX-Cxx
Loading...
Searching...
No Matches
Crypto.hxx
Go to the documentation of this file.
1#pragma once
2
3#include "Types.hxx"
4#include <cstdio>
5
7
9
11
12Bytes dynxxCryptoAesGcmEncrypt(BytesView in, BytesView key, BytesView initVector, size_t tagBits,
13 BytesView aad = {});
14
15Bytes dynxxCryptoAesGcmDecrypt(BytesView in, BytesView key, BytesView initVector, size_t tagBits,
16 BytesView aad = {});
17
18enum class DynXXCryptoRSAPaddingX : uint8_t {
19 PKCS1 = 1,
20 SSLV23 = 2,
21 NONE = 3,
22 PKCS1_OAEP = 4,
23 X931 = 5,
24 PKCS1_PSS = 6
25};
26
27std::string dynxxCryptoRsaGenKey(std::string_view base64, bool isPublic);
28
30
32
34
36
38
39Bytes dynxxCryptoBase64Encode(BytesView in, bool noNewLines = true);
40
41Bytes dynxxCryptoBase64Decode(BytesView in, bool noNewLines = true);
std::string dynxxCryptoRsaGenKey(std::string_view base64, bool isPublic)
Bytes dynxxCryptoHashSha256(BytesView in)
Bytes dynxxCryptoHashMd5(BytesView in)
Bytes dynxxCryptoBase64Encode(BytesView in, bool noNewLines=true)
Bytes dynxxCryptoRsaDecrypt(BytesView in, BytesView key, DynXXCryptoRSAPaddingX padding)
Bytes dynxxCryptoRsaEncrypt(BytesView in, BytesView key, DynXXCryptoRSAPaddingX padding)
Bytes dynxxCryptoAesGcmEncrypt(BytesView in, BytesView key, BytesView initVector, size_t tagBits, BytesView aad={})
Bytes dynxxCryptoAesGcmDecrypt(BytesView in, BytesView key, BytesView initVector, size_t tagBits, BytesView aad={})
Bytes dynxxCryptoAesEncrypt(BytesView in, BytesView key)
Bytes dynxxCryptoHashSha1(BytesView in)
Bytes dynxxCryptoBase64Decode(BytesView in, bool noNewLines=true)
Bytes dynxxCryptoAesDecrypt(BytesView in, BytesView key)
DynXXCryptoRSAPaddingX
Definition Crypto.hxx:18
Bytes dynxxCryptoRand(size_t len)
std::span< const byte > BytesView
Definition Types.hxx:289
std::vector< byte > Bytes
Definition Types.hxx:290