SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
RSA.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstddef>
4
#include <span>
5
#include <string>
6
#include <vector>
7
8
#include <
sourcepp/Math.h
>
9
10
namespace
sourcepp::crypto
{
11
12
[[nodiscard]] std::pair<std::string, std::string>
computeSHA256KeyPair
(uint16_t size = 2048);
13
14
[[nodiscard]]
bool
verifySHA256PublicKey
(std::span<const std::byte> buffer, std::span<const std::byte> publicKey, std::span<const std::byte> signature);
15
16
[[nodiscard]] std::vector<std::byte>
signDataWithSHA256PrivateKey
(std::span<const std::byte> buffer, std::span<const std::byte> privateKey);
17
18
}
// namespace sourcepp::crypto
Math.h
sourcepp::crypto
Definition
Adler32.h:8
sourcepp::crypto::signDataWithSHA256PrivateKey
std::vector< std::byte > signDataWithSHA256PrivateKey(std::span< const std::byte > buffer, std::span< const std::byte > privateKey)
Definition
RSA.cpp:80
sourcepp::crypto::verifySHA256PublicKey
bool verifySHA256PublicKey(std::span< const std::byte > buffer, std::span< const std::byte > publicKey, std::span< const std::byte > signature)
Definition
RSA.cpp:64
sourcepp::crypto::computeSHA256KeyPair
std::pair< std::string, std::string > computeSHA256KeyPair(uint16_t size=2048)
Definition
RSA.cpp:20
include
sourcepp
crypto
RSA.h
Generated on
for SourcePP by
1.17.0