mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-05-06 20:44:57 +00:00
28 lines
674 B
C++
28 lines
674 B
C++
#pragma once
|
|
|
|
#include "IHashFunction.h"
|
|
#include "IPublicKeyAlgorithm.h"
|
|
#include "IStreamCipher.h"
|
|
|
|
#include <cstddef>
|
|
#include <memory>
|
|
|
|
class Crypto
|
|
{
|
|
public:
|
|
enum class RSAPaddingMode
|
|
{
|
|
RSA_PADDING_PKS1,
|
|
RSA_PADDING_PSS,
|
|
};
|
|
|
|
static std::unique_ptr<IHashFunction> CreateMD5();
|
|
|
|
static std::unique_ptr<IHashFunction> CreateSHA1();
|
|
static std::unique_ptr<IHashFunction> CreateSHA256();
|
|
|
|
static std::unique_ptr<IStreamCipher> CreateSalsa20(const uint8_t* keyBytes, size_t keySize);
|
|
|
|
static std::unique_ptr<IPublicKeyAlgorithm> CreateRSA(IPublicKeyAlgorithm::HashingAlgorithm hashingAlgorithm, RSAPaddingMode paddingMode);
|
|
};
|